Index: trunk/.pc/.quilt_patches =================================================================== --- trunk/.pc/.quilt_patches (nonexistent) +++ trunk/.pc/.quilt_patches (revision 4) @@ -0,0 +1 @@ +debian/patches Index: trunk/.pc/.quilt_series =================================================================== --- trunk/.pc/.quilt_series (nonexistent) +++ trunk/.pc/.quilt_series (revision 4) @@ -0,0 +1 @@ +series Index: trunk/.pc/.version =================================================================== --- trunk/.pc/.version (nonexistent) +++ trunk/.pc/.version (revision 4) @@ -0,0 +1 @@ +2 Index: trunk/.pc/0001-Fixed-command-line-batch-output-for-some-exporters.patch/src/main.c =================================================================== --- trunk/.pc/0001-Fixed-command-line-batch-output-for-some-exporters.patch/src/main.c (nonexistent) +++ trunk/.pc/0001-Fixed-command-line-batch-output-for-some-exporters.patch/src/main.c (revision 4) @@ -0,0 +1,1968 @@ +/* $Id$ */ + +/* + * COPYRIGHT + * + * PCB, interactive printed circuit board design + * Copyright (C) 1994,1995,1996, 2004 Thomas Nau + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + * Contact addresses for paper mail and Email: + * Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany + * Thomas.Nau@rz.uni-ulm.de + * + */ + + +/* main program, initializes some stuff and handles user input + */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#ifdef HAVE_STRING_H +#include +#endif +#include +#include +#include +#include /* Seed for srand() */ + +#include "global.h" +#include "data.h" +#include "buffer.h" +#include "create.h" +#include "crosshair.h" +#include "draw.h" +#include "error.h" +#include "file.h" +#include "set.h" +#include "action.h" +#include "misc.h" +#include "lrealpath.h" +#include "free_atexit.h" +#include "polygon.h" +#include "pcb-printf.h" + +#include "hid/common/actions.h" + +/* This next one is so we can print the help messages. */ +#include "hid/hidint.h" + +#ifdef HAVE_DBUS +#include "dbus.h" +#endif + +#if ENABLE_NLS +#include +#endif + +#ifdef HAVE_LIBDMALLOC +#include +#endif + +RCSID ("$Id$"); + + +#define PCBLIBPATH ".:" PCBLIBDIR + + +#ifdef HAVE_LIBSTROKE +extern void stroke_init (void); +#endif + + +/* ---------------------------------------------------------------------- + * initialize signal and error handlers + */ +static void +InitHandler (void) +{ +/* + signal(SIGHUP, CatchSignal); + signal(SIGQUIT, CatchSignal); + signal(SIGABRT, CatchSignal); + signal(SIGSEGV, CatchSignal); + signal(SIGTERM, CatchSignal); + signal(SIGINT, CatchSignal); +*/ + + /* calling external program by popen() may cause a PIPE signal, + * so we ignore it + */ +#ifdef SIGPIPE + signal (SIGPIPE, SIG_IGN); +#endif +} + + + /* ---------------------------------------------------------------------- + | command line and rc file processing. + */ +static char *command_line_pcb; + +void +copyright (void) +{ + printf ("\n" + " COPYRIGHT for %s version %s\n\n" + " PCB, interactive printed circuit board design\n" + " Copyright (C) 1994,1995,1996,1997 Thomas Nau\n" + " Copyright (C) 1998, 1999, 2000 Harry Eaton\n\n" + " This program is free software; you can redistribute it and/or modify\n" + " it under the terms of the GNU General Public License as published by\n" + " the Free Software Foundation; either version 2 of the License, or\n" + " (at your option) any later version.\n\n" + " This program is distributed in the hope that it will be useful,\n" + " but WITHOUT ANY WARRANTY; without even the implied warranty of\n" + " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" + " GNU General Public License for more details.\n\n" + " You should have received a copy of the GNU General Public License\n" + " along with this program; if not, write to the Free Software\n" + " Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\n\n", + Progname, VERSION); + exit (0); +} + +static inline void +u (const char *fmt, ...) +{ + va_list ap; + va_start (ap, fmt); + vfprintf (stderr, fmt, ap); + fputc ('\n', stderr); + va_end (ap); +} + +typedef struct UsageNotes { + struct UsageNotes *next; + HID_Attribute *seen; +} UsageNotes; + +static UsageNotes *usage_notes = NULL; + +static void +usage_attr (HID_Attribute * a) +{ + int i, n; + const Unit *unit_list; + static char buf[200]; + + if (a->help_text == ATTR_UNDOCUMENTED) + return; + + switch (a->type) + { + case HID_Label: + return; + case HID_Integer: + case HID_Real: + sprintf (buf, "--%s ", a->name); + break; + case HID_Coord: + sprintf (buf, "--%s ", a->name); + break; + case HID_String: + sprintf (buf, "--%s ", a->name); + break; + case HID_Boolean: + sprintf (buf, "--%s", a->name); + break; + case HID_Mixed: + case HID_Enum: + sprintf (buf, "--%s ", a->name); + if (a->type == HID_Mixed) + strcat (buf, " "); + for (i = 0; a->enumerations[i]; i++) + { + strcat (buf, i ? "|" : "<"); + strcat (buf, a->enumerations[i]); + } + strcat (buf, ">"); + break; + case HID_Path: + sprintf (buf, "--%s ", a->name); + break; + case HID_Unit: + unit_list = get_unit_list (); + n = get_n_units (); + sprintf (buf, "--%s ", a->name); + for (i = 0; i < n; i++) + { + strcat (buf, i ? "|" : "<"); + strcat (buf, unit_list[i].suffix); + } + strcat (buf, ">"); + break; + } + + if (strlen (buf) <= 30) + { + if (a->help_text) + fprintf (stderr, " %-30s\t%s\n", buf, a->help_text); + else + fprintf (stderr, " %-30s\n", buf); + } + else if (a->help_text && strlen (a->help_text) + strlen (buf) < 72) + fprintf (stderr, " %s\t%s\n", buf, a->help_text); + else if (a->help_text) + fprintf (stderr, " %s\n\t\t\t%s\n", buf, a->help_text); + else + fprintf (stderr, " %s\n", buf); +} + +static void +usage_hid (HID * h) +{ + HID_Attribute *attributes; + int i, n_attributes = 0; + UsageNotes *note; + + if (h->gui) + { + fprintf (stderr, "\n%s gui options:\n", h->name); + attributes = h->get_export_options (&n_attributes); + } + else + { + fprintf (stderr, "\n%s options:\n", h->name); + exporter = h; + attributes = exporter->get_export_options (&n_attributes); + exporter = NULL; + } + + note = (UsageNotes *)malloc (sizeof (UsageNotes)); + note->next = usage_notes; + note->seen = attributes; + usage_notes = note; + + for (i = 0; i < n_attributes; i++) + usage_attr (attributes + i); +} + +static void +usage (void) +{ + HID **hl = hid_enumerate (); + HID_AttrNode *ha; + UsageNotes *note; + int i; + int n_printer = 0, n_gui = 0, n_exporter = 0; + + for (i = 0; hl[i]; i++) + { + if (hl[i]->gui) + n_gui++; + if (hl[i]->printer) + n_printer++; + if (hl[i]->exporter) + n_exporter++; + } + + u ("PCB Printed Circuit Board editing program, http://pcb.gpleda.org"); + u ("%s [-h|-V|--copyright]\t\t\tHelp, version, copyright", Progname); + u ("%s [gui options] \t\tto edit", Progname); + u ("Available GUI hid%s:", n_gui == 1 ? "" : "s"); + for (i = 0; hl[i]; i++) + if (hl[i]->gui) + fprintf (stderr, "\t%-8s %s\n", hl[i]->name, hl[i]->description); + u ("%s -p [printing options] \tto print", Progname); + u ("Available printing hid%s:", n_printer == 1 ? "" : "s"); + for (i = 0; hl[i]; i++) + if (hl[i]->printer) + fprintf (stderr, "\t%-8s %s\n", hl[i]->name, hl[i]->description); + u ("%s -x hid [export options] \tto export", Progname); + u ("Available export hid%s:", n_exporter == 1 ? "" : "s"); + for (i = 0; hl[i]; i++) + if (hl[i]->exporter) + fprintf (stderr, "\t%-8s %s\n", hl[i]->name, hl[i]->description); + + for (i = 0; hl[i]; i++) + if (hl[i]->gui) + usage_hid (hl[i]); + for (i = 0; hl[i]; i++) + if (hl[i]->printer) + usage_hid (hl[i]); + for (i = 0; hl[i]; i++) + if (hl[i]->exporter) + usage_hid (hl[i]); + + u ("\nCommon options:"); + for (ha = hid_attr_nodes; ha; ha = ha->next) + { + for (note = usage_notes; note && note->seen != ha->attributes; note = note->next) + ; + if (note) + continue; + for (i = 0; i < ha->n; i++) + { + usage_attr (ha->attributes + i); + } + } + + exit (1); +} + +static void +print_defaults_1 (HID_Attribute * a, void *value) +{ + int i; + Coord c; + double d; + const char *s; + + /* Remember, at this point we've parsed the command line, so they + may be in the global variable instead of the default_val. */ + switch (a->type) + { + case HID_Integer: + i = value ? *(int *) value : a->default_val.int_value; + fprintf (stderr, "%s %d\n", a->name, i); + break; + case HID_Boolean: + i = value ? *(char *) value : a->default_val.int_value; + fprintf (stderr, "%s %s\n", a->name, i ? "yes" : "no"); + break; + case HID_Real: + d = value ? *(double *) value : a->default_val.real_value; + fprintf (stderr, "%s %g\n", a->name, d); + break; + case HID_Coord: + c = value ? *(Coord *) value : a->default_val.coord_value; + pcb_fprintf (stderr, "%s %$mS\n", a->name, c); + break; + case HID_String: + case HID_Path: + s = value ? *(char **) value : a->default_val.str_value; + fprintf (stderr, "%s \"%s\"\n", a->name, s); + break; + case HID_Enum: + i = value ? *(int *) value : a->default_val.int_value; + fprintf (stderr, "%s %s\n", a->name, a->enumerations[i]); + break; + case HID_Mixed: + i = value ? + ((HID_Attr_Val*)value)->int_value : a->default_val.int_value; + d = value ? + ((HID_Attr_Val*)value)->real_value : a->default_val.real_value; + fprintf (stderr, "%s %g%s\n", a->name, d, a->enumerations[i]); + break; + case HID_Label: + break; + case HID_Unit: + i = value ? *(int *) value : a->default_val.int_value; + fprintf (stderr, "%s %s\n", a->name, get_unit_list()[i].suffix); + } +} + +static void +print_defaults () +{ + HID **hl = hid_enumerate (); + HID_Attribute *e; + int i, n, hi; + + for (hi = 0; hl[hi]; hi++) + { + HID *h = hl[hi]; + if (h->gui) + { + HID_AttrNode *ha; + fprintf (stderr, "\ngui defaults:\n"); + for (ha = hid_attr_nodes; ha; ha = ha->next) + for (i = 0; i < ha->n; i++) + print_defaults_1 (ha->attributes + i, ha->attributes[i].value); + } + else + { + fprintf (stderr, "\n%s defaults:\n", h->name); + exporter = h; + e = exporter->get_export_options (&n); + exporter = NULL; + if (e) + for (i = 0; i < n; i++) + print_defaults_1 (e + i, 0); + } + } + exit (1); +} + +#define SSET(F,D,N,H) { N, H, \ + HID_String, 0, 0, { 0, D, 0 }, 0, &Settings.F } +#define ISET(F,D,N,H) { N, H, \ + HID_Integer, 0, 0, { D, 0, 0 }, 0, &Settings.F } +#define BSET(F,D,N,H) { N, H, \ + HID_Boolean, 0, 0, { D, 0, 0 }, 0, &Settings.F } +#define RSET(F,D,N,H) { N, H, \ + HID_Real, 0, 0, { 0, 0, D }, 0, &Settings.F } +#define CSET(F,D,N,H) { N, H, \ + HID_Coord, 0, 0, { 0, 0, 0, D }, 0, &Settings.F } + +#define COLOR(F,D,N,H) { N, H, \ + HID_String, 0, 0, { 0, D, 0 }, 0, &Settings.F } +#define LAYERCOLOR(N,D) { "layer-color-" #N, "Color for layer " #N, \ + HID_String, 0, 0, { 0, D, 0 }, 0, &Settings.LayerColor[N-1] } +#define LAYERNAME(N,D) { "layer-name-" #N, "Name for layer " #N, \ + HID_String, 0, 0, { 0, D, 0 }, 0, &Settings.DefaultLayerName[N-1] } +#define LAYERSELCOLOR(N) { "layer-selected-color-" #N, "Color for layer " #N " when selected", \ + HID_String, 0, 0, { 0, "#00ffff", 0 }, 0, &Settings.LayerSelectedColor[N-1] } + +static int show_help = 0; +static int show_version = 0; +static int show_copyright = 0; +static int show_defaults = 0; +static int show_actions = 0; +static int do_dump_actions = 0; +static char *grid_units; + +HID_Attribute main_attribute_list[] = { + +/* %start-doc options "1 General Options" +@ftable @code +@item --help +Show help on command line options. +@end ftable +%end-doc +*/ + {"help", "Show help on command line options", HID_Boolean, 0, 0, {0, 0, 0}, 0, + &show_help}, + +/* %start-doc options "1 General Options" +@ftable @code +@item --version +Show version. +@end ftable +%end-doc +*/ + {"version", "Show version", HID_Boolean, 0, 0, {0, 0, 0}, 0, &show_version}, + +/* %start-doc options "1 General Options" +@ftable @code +@item --verbose +Be verbose on stdout. +@end ftable +%end-doc +*/ + {"verbose", "Be verbose on stdout", HID_Boolean, 0, 0, {0, 0, 0}, 0, + &Settings.verbose}, + +/* %start-doc options "1 General Options" +@ftable @code +@item --copyright +Show copyright. +@end ftable +%end-doc +*/ + {"copyright", "Show Copyright", HID_Boolean, 0, 0, {0, 0, 0}, 0, + &show_copyright}, + +/* %start-doc options "1 General Options" +@ftable @code +@item --show-defaults +Show option defaults. +@end ftable +%end-doc +*/ + {"show-defaults", "Show option defaults", HID_Boolean, 0, 0, {0, 0, 0}, 0, + &show_defaults}, + +/* %start-doc options "1 General Options" +@ftable @code +@item --show-actions +Show available actions and exit. +@end ftable +%end-doc +*/ + {"show-actions", "Show available actions", HID_Boolean, 0, 0, {0, 0, 0}, 0, + &show_actions}, + +/* %start-doc options "1 General Options" +@ftable @code +@item --dump-actions +Dump actions (for documentation). +@end ftable +%end-doc +*/ + {"dump-actions", "Dump actions (for documentation)", HID_Boolean, 0, 0, + {0, 0, 0}, 0, &do_dump_actions}, + +/* %start-doc options "1 General Options" +@ftable @code +@item --grid-units-mm +Set default grid units. Can be mm or mil. Defaults to mil. +@end ftable +%end-doc +*/ + {"grid-units", "Default grid units (mm|mil)", HID_String, 0, 0, {0, "mil", 0}, + 0, &grid_units}, + +/* %start-doc options "3 Colors" +@ftable @code +@item --black-color +Color value for black. Default: @samp{#000000} +@end ftable +%end-doc +*/ + COLOR (BlackColor, "#000000", "black-color", "color value of 'black'"), + +/* %start-doc options "3 Colors" +@ftable @code +@item --black-color +Color value for white. Default: @samp{#ffffff} +@end ftable +%end-doc +*/ + COLOR (WhiteColor, "#ffffff", "white-color", "color value of 'white'"), + +/* %start-doc options "3 Colors" +@ftable @code +@item --background-color +Background color of the canvas. Default: @samp{#e5e5e5} +@end ftable +%end-doc +*/ + COLOR (BackgroundColor, "#e5e5e5", "background-color", + "color for background"), + +/* %start-doc options "3 Colors" +@ftable @code +@item --crosshair-color +Color of the crosshair. Default: @samp{#ff0000} +@end ftable +%end-doc +*/ + COLOR (CrosshairColor, "#ff0000", "crosshair-color", + "color for the crosshair"), + +/* %start-doc options "3 Colors" +@ftable @code +@item --cross-color +Color of the cross. Default: @samp{#cdcd00} +@end ftable +%end-doc +*/ + COLOR (CrossColor, "#cdcd00", "cross-color", "color of the cross"), + +/* %start-doc options "3 Colors" +@ftable @code +@item --via-color +Color of vias. Default: @samp{#7f7f7f} +@end ftable +%end-doc +*/ + COLOR (ViaColor, "#7f7f7f", "via-color", "color of vias"), + +/* %start-doc options "3 Colors" +@ftable @code +@item --via-selected-color +Color of selected vias. Default: @samp{#00ffff} +@end ftable +%end-doc +*/ + COLOR (ViaSelectedColor, "#00ffff", "via-selected-color", + "color for selected vias"), + +/* %start-doc options "3 Colors" +@ftable @code +@item --pin-color +Color of pins. Default: @samp{#4d4d4d} +@end ftable +%end-doc +*/ + COLOR (PinColor, "#4d4d4d", "pin-color", "color of pins"), + +/* %start-doc options "3 Colors" +@ftable @code +@item --pin-selected-color +Color of selected pins. Default: @samp{#00ffff} +@end ftable +%end-doc +*/ + COLOR (PinSelectedColor, "#00ffff", "pin-selected-color", + "color of selected pins"), + +/* %start-doc options "3 Colors" +@ftable @code +@item --pin-name-color +Color of pin names and pin numbers. Default: @samp{#ff0000} +@end ftable +%end-doc +*/ + COLOR (PinNameColor, "#ff0000", "pin-name-color", + "color for pin names and pin numbers"), + +/* %start-doc options "3 Colors" +@ftable @code +@item --element-color +Color of components. Default: @samp{#000000} +@end ftable +%end-doc +*/ + COLOR (ElementColor, "#000000", "element-color", "color of components"), + +/* %start-doc options "3 Colors" +@ftable @code +@item --rat-color +Color of ratlines. Default: @samp{#b8860b} +@end ftable +%end-doc +*/ + COLOR (RatColor, "#b8860b", "rat-color", "color of ratlines"), + +/* %start-doc options "3 Colors" +@ftable @code +@item --invisible-objects-color +Color of invisible objects. Default: @samp{#cccccc} +@end ftable +%end-doc +*/ + COLOR (InvisibleObjectsColor, "#cccccc", "invisible-objects-color", + "color of invisible objects"), + +/* %start-doc options "3 Colors" +@ftable @code +@item --invisible-mark-color +Color of invisible marks. Default: @samp{#cccccc} +@end ftable +%end-doc +*/ + COLOR (InvisibleMarkColor, "#cccccc", "invisible-mark-color", + "color of invisible marks"), + +/* %start-doc options "3 Colors" +@ftable @code +@item --element-selected-color +Color of selected components. Default: @samp{#00ffff} +@end ftable +%end-doc +*/ + COLOR (ElementSelectedColor, "#00ffff", "element-selected-color", + "color of selected components"), + +/* %start-doc options "3 Colors" +@ftable @code +@item --rat-selected-color +Color of selected rats. Default: @samp{#00ffff} +@end ftable +%end-doc +*/ + COLOR (RatSelectedColor, "#00ffff", "rat-selected-color", + "color of selected rats"), + +/* %start-doc options "3 Colors" +@ftable @code +@item --connected-color +Color to indicate connections. Default: @samp{#00ff00} +@end ftable +%end-doc +*/ + COLOR (ConnectedColor, "#00ff00", "connected-color", + "color to indicate connections"), + +/* %start-doc options "3 Colors" +@ftable @code +@item --off-limit-color +Color of off-canvas area. Default: @samp{#cccccc} +@end ftable +%end-doc +*/ + COLOR (OffLimitColor, "#cccccc", "off-limit-color", + "color of off-canvas area"), + +/* %start-doc options "3 Colors" +@ftable @code +@item --grid-color +Color of the grid. Default: @samp{#ff0000} +@end ftable +%end-doc +*/ + COLOR (GridColor, "#ff0000", "grid-color", "color of the grid"), + +/* %start-doc options "3 Colors" +@ftable @code +@item --layer-color- +Color of layer @code{}, where @code{} is an integer from 1 to 16. +@end ftable +%end-doc +*/ + LAYERCOLOR (1, "#8b2323"), + LAYERCOLOR (2, "#3a5fcd"), + LAYERCOLOR (3, "#104e8b"), + LAYERCOLOR (4, "#cd3700"), + LAYERCOLOR (5, "#548b54"), + LAYERCOLOR (6, "#8b7355"), + LAYERCOLOR (7, "#00868b"), + LAYERCOLOR (8, "#228b22"), + LAYERCOLOR (9, "#8b2323"), + LAYERCOLOR (10, "#3a5fcd"), + LAYERCOLOR (11, "#104e8b"), + LAYERCOLOR (12, "#cd3700"), + LAYERCOLOR (13, "#548b54"), + LAYERCOLOR (14, "#8b7355"), + LAYERCOLOR (15, "#00868b"), + LAYERCOLOR (16, "#228b22"), +/* %start-doc options "3 Colors" +@ftable @code +@item --layer-selected-color- +Color of layer @code{}, when selected. @code{} is an integer from 1 to 16. +@end ftable +%end-doc +*/ + LAYERSELCOLOR (1), + LAYERSELCOLOR (2), + LAYERSELCOLOR (3), + LAYERSELCOLOR (4), + LAYERSELCOLOR (5), + LAYERSELCOLOR (6), + LAYERSELCOLOR (7), + LAYERSELCOLOR (8), + LAYERSELCOLOR (9), + LAYERSELCOLOR (10), + LAYERSELCOLOR (11), + LAYERSELCOLOR (12), + LAYERSELCOLOR (13), + LAYERSELCOLOR (14), + LAYERSELCOLOR (15), + LAYERSELCOLOR (16), + +/* %start-doc options "3 Colors" +@ftable @code +@item --warn-color +Color of offending objects during DRC. Default value is @code{"#ff8000"} +@end ftable +%end-doc +*/ + COLOR (WarnColor, "#ff8000", "warn-color", "color of offending objects during DRC"), + +/* %start-doc options "3 Colors" +@ftable @code +@item --mask-color +Color of the mask layer. Default value is @code{"#ff0000"} +@end ftable +%end-doc +*/ + COLOR (MaskColor, "#ff0000", "mask-color", "color for solder mask"), + + +/* %start-doc options "5 Sizes" +All parameters should be given with an unit. If no unit is given, 1/100 mil +(cmil) will be used. Write units without space to the +number like @code{3mm}, not @code{3 mm}. +Valid Units are: + @table @samp + @item km + Kilometer + @item m + Meter + @item cm + Centimeter + @item mm + Millimeter + @item um + Micrometer + @item nm + Nanometer + @item in + Inch (1in = 0.0254m) + @item mil + Mil (1000mil = 1in) + @item cmil + Centimil (1/100 mil) +@end table + +@ftable @code +@item --via-thickness +Default diameter of vias. Default value is @code{60mil}. +@end ftable +%end-doc +*/ + CSET (ViaThickness, MIL_TO_COORD(60), "via-thickness", + "default diameter of vias in 1/100 mil"), + +/* %start-doc options "5 Sizes" +@ftable @code +@item --via-drilling-hole +Default diameter of holes. Default value is @code{28mil}. +@end ftable +%end-doc +*/ + CSET (ViaDrillingHole, MIL_TO_COORD(28), "via-drilling-hole", + "default diameter of holes"), + +/* %start-doc options "5 Sizes" +@ftable @code +@item --line-thickness +Default thickness of new lines. Default value is @code{10mil}. +@end ftable +%end-doc +*/ + CSET (LineThickness, MIL_TO_COORD(10), "line-thickness", + "initial thickness of new lines"), + +/* %start-doc options "5 Sizes" +@ftable @code +@item --rat-thickness +Thickness of rats. Values from 1 to 19 are fixed width in screen pixels. +Anything larger means PCB units (i.e. 100 means "1 mil"). Default value +is @code{10mil}. +@end ftable +%end-doc +*/ + CSET (RatThickness, MIL_TO_COORD(10), "rat-thickness", "thickness of rat lines"), + +/* %start-doc options "5 Sizes" +@ftable @code +@item --keepaway +Default minimum distance between a track and adjacent copper. +Default value is @code{10mil}. +@end ftable +%end-doc +*/ + CSET (Keepaway, MIL_TO_COORD(10), "keepaway", "minimum distance between adjacent copper"), + +/* %start-doc options "5 Sizes" +@ftable @code +@item --default-PCB-width +Default width of the canvas. Default value is @code{6000mil}. +@end ftable +%end-doc +*/ + CSET (MaxWidth, MIL_TO_COORD(6000), "default-PCB-width", + "default width of the canvas"), + +/* %start-doc options "5 Sizes" +@ftable @code +@item --default-PCB-height +Default height of the canvas. Default value is @code{5000mil}. +@end ftable +%end-doc +*/ + CSET (MaxHeight, MIL_TO_COORD(5000), "default-PCB-height", + "default height of the canvas"), + +/* %start-doc options "5 Sizes" +@ftable @code +@item --text-scale +Default text scale. This value is in percent. Default value is @code{100}. +@end ftable +%end-doc +*/ + ISET (TextScale, 100, "text-scale", "default text scale in percent"), + +/* %start-doc options "5 Sizes" +@ftable @code +@item --alignment-distance +Specifies the distance between the board outline and alignment targets. +Default value is @code{2mil}. +@end ftable +%end-doc +*/ + CSET (AlignmentDistance, MIL_TO_COORD(2), "alignment-distance", + "distance between the boards outline and alignment targets"), + +/* %start-doc options "7 DRC Options" +All parameters should be given with an unit. If no unit is given, 1/100 mil +(cmil) will be used for backward compability. Valid units are given in section +@ref{Sizes}. +%end-doc +*/ + + +/* %start-doc options "7 DRC Options" +@ftable @code +@item --bloat +Minimum spacing. Default value is @code{10mil}. +@end ftable +%end-doc +*/ + CSET (Bloat, MIL_TO_COORD(10), "bloat", "DRC minimum spacing in 1/100 mil"), + +/* %start-doc options "7 DRC Options" +@ftable @code +@item --shrink +Minimum touching overlap. Default value is @code{10mil}. +@end ftable +%end-doc +*/ + CSET (Shrink, MIL_TO_COORD(10), "shrink", "DRC minimum overlap in 1/100 mils"), + +/* %start-doc options "7 DRC Options" +@ftable @code +@item --min-width +Minimum width of copper. Default value is @code{10mil}. +@end ftable +%end-doc +*/ + CSET (minWid, MIL_TO_COORD(10), "min-width", "DRC minimum copper spacing"), + +/* %start-doc options "7 DRC Options" +@ftable @code +@item --min-silk +Minimum width of lines in silk. Default value is @code{10mil}. +@end ftable +%end-doc +*/ + CSET (minSlk, MIL_TO_COORD(10), "min-silk", "DRC minimum silk width"), + +/* %start-doc options "7 DRC Options" +@ftable @code +@item --min-drill +Minimum diameter of holes. Default value is @code{15mil}. +@end ftable +%end-doc +*/ + CSET (minDrill, MIL_TO_COORD(15), "min-drill", "DRC minimum drill diameter"), + +/* %start-doc options "7 DRC Options" +@ftable @code +@item --min-ring +Minimum width of annular ring. Default value is @code{10mil}. +@end ftable +%end-doc +*/ + CSET (minRing, MIL_TO_COORD(10), "min-ring", "DRC minimum annular ring"), + + +/* %start-doc options "5 Sizes" +@ftable @code +@item --grid +Initial grid size. Default value is @code{10mil}. +@end ftable +%end-doc +*/ + CSET (Grid, MIL_TO_COORD(10), "grid", "Initial grid size in 1/100 mil"), + +/* %start-doc options "5 Sizes" +@ftable @code +@item --minimum polygon area +Minimum polygon area. +@end ftable +%end-doc +*/ + RSET (IsleArea, MIL_TO_COORD(100) * MIL_TO_COORD(100), "minimum polygon area", 0), + + +/* %start-doc options "1 General Options" +@ftable @code +@item --backup-interval +Time between automatic backups in seconds. Set to @code{0} to disable. +The default value is @code{60}. +@end ftable +%end-doc +*/ + ISET (BackupInterval, 60, "backup-interval", + "Time between automatic backups in seconds. Set to 0 to disable"), + +/* %start-doc options "4 Layer Names" +@ftable @code +@item --layer-name-1 +Name of the 1st Layer. Default is @code{"top"}. +@end ftable +%end-doc +*/ + LAYERNAME (1, "top"), + +/* %start-doc options "4 Layer Names" +@ftable @code +@item --layer-name-2 +Name of the 2nd Layer. Default is @code{"ground"}. +@end ftable +%end-doc +*/ + LAYERNAME (2, "ground"), + +/* %start-doc options "4 Layer Names" +@ftable @code +@item --layer-name-3 +Name of the 3nd Layer. Default is @code{"signal2"}. +@end ftable +%end-doc +*/ + LAYERNAME (3, "signal2"), + +/* %start-doc options "4 Layer Names" +@ftable @code +@item --layer-name-4 +Name of the 4rd Layer. Default is @code{"signal3"}. +@end ftable +%end-doc +*/ + LAYERNAME (4, "signal3"), + +/* %start-doc options "4 Layer Names" +@ftable @code +@item --layer-name-5 +Name of the 5rd Layer. Default is @code{"power"}. +@end ftable +%end-doc +*/ + LAYERNAME (5, "power"), + +/* %start-doc options "4 Layer Names" +@ftable @code +@item --layer-name-6 +Name of the 6rd Layer. Default is @code{"bottom"}. +@end ftable +%end-doc +*/ + LAYERNAME (6, "bottom"), + +/* %start-doc options "4 Layer Names" +@ftable @code +@item --layer-name-7 +Name of the 7rd Layer. Default is @code{"outline"}. +@end ftable +%end-doc +*/ + LAYERNAME (7, "outline"), + +/* %start-doc options "4 Layer Names" +@ftable @code +@item --layer-name-8 +Name of the 8rd Layer. Default is @code{"spare"}. +@end ftable +%end-doc +*/ + LAYERNAME (8, "spare"), + +/* %start-doc options "1 General Options" +@ftable @code +@item --groups +Layer group string. Defaults to @code{"1,c:2:3:4:5:6,s:7:8"}. +@end ftable +%end-doc +*/ + SSET (Groups, "1,c:2:3:4:5:6,s:7:8", "groups", "Layer group string"), + + +/* %start-doc options "6 Commands" +pcb uses external commands for input output operations. These commands can be +configured at start-up to meet local requirements. The command string may include +special sequences @code{%f}, @code{%p} or @code{%a}. These are replaced when the +command is called. The sequence @code{%f} is replaced by the file name, +@code{%p} gets the path and @code{%a} indicates a package name. +%end-doc +*/ + +/* %start-doc options "6 Commands" +@ftable @code +@item --font-command +Command to load a font. +@end ftable +%end-doc +*/ + SSET (FontCommand, "", "font-command", "Command to load a font"), + +/* %start-doc options "6 Commands" +@ftable @code +@item --file-command +Command to read a file. +@end ftable +%end-doc +*/ + SSET (FileCommand, "", "file-command", "Command to read a file"), + +/* %start-doc options "6 Commands" +@ftable @code +@item --element-command +Command to read a footprint. @* +Defaults to @code{"M4PATH='%p';export M4PATH;echo 'include(%f)' | m4"} +@end ftable +%end-doc +*/ + SSET (ElementCommand, + "M4PATH='%p';export M4PATH;echo 'include(%f)' | " GNUM4, + "element-command", "Command to read a footprint"), + +/* %start-doc options "6 Commands" +@ftable @code +@item --print-file +Command to print to a file. +@end ftable +%end-doc +*/ + SSET (PrintFile, "%f.output", "print-file", "Command to print to a file"), + +/* %start-doc options "6 Commands" +@ftable @code +@item --lib-command-dir +Path to the command that queries the library. +@end ftable +%end-doc +*/ + SSET (LibraryCommandDir, PCBLIBDIR, "lib-command-dir", + "Path to the command that queries the library"), + +/* %start-doc options "6 Commands" +@ftable @code +@item --lib-command +Command to query the library. @* +Defaults to @code{"QueryLibrary.sh '%p' '%f' %a"} +@end ftable +%end-doc +*/ + SSET (LibraryCommand, "QueryLibrary.sh '%p' '%f' %a", + "lib-command", "Command to query the library"), + +/* %start-doc options "6 Commands" +@ftable @code +@item --lib-contents-command +Command to query the contents of the library. @* +Defaults to @code{"ListLibraryContents.sh %p %f"} or, +on Windows builds, an empty string (to disable this feature). +@end ftable +%end-doc +*/ + SSET (LibraryContentsCommand, +#ifdef __WIN32__ + "", +#else + "ListLibraryContents.sh '%p' '%f'", +#endif + "lib-contents-command", "Command to query the contents of the library"), + +/* %start-doc options "5 Paths" +@ftable @code +@item --lib-newlib +Top level directory for the newlib style library. +@end ftable +%end-doc +*/ + SSET (LibraryTree, PCBTREEPATH, "lib-newlib", + "Top level directory for the newlib style library"), + +/* %start-doc options "6 Commands" +@ftable @code +@item --save-command +Command to save to a file. +@end ftable +%end-doc +*/ + SSET (SaveCommand, "", "save-command", "Command to save to a file"), + +/* %start-doc options "5 Paths" +@ftable @code +@item --lib-name +The default filename for the library. +@end ftable +%end-doc +*/ + SSET (LibraryFilename, LIBRARYFILENAME, "lib-name", + "The default filename for the library"), + +/* %start-doc options "5 Paths" +@ftable @code +@item --default-font +The name of the default font. +@end ftable +%end-doc +*/ + SSET (FontFile, "default_font", "default-font", + "File name of default font"), + +/* %start-doc options "1 General Options" +@ftable @code +@item --route-styles +A string that defines the route styles. Defaults to @* +@code{"Signal,1000,3600,2000,1000:Power,2500,6000,3500,1000 + :Fat,4000,6000,3500,1000:Skinny,600,2402,1181,600"} +@end ftable +%end-doc +*/ + SSET (Routes, "Signal,1000,3600,2000,1000:Power,2500,6000,3500,1000" + ":Fat,4000,6000,3500,1000:Skinny,600,2402,1181,600", "route-styles", + "A string that defines the route styles"), + +/* %start-doc options "5 Paths" +@ftable @code +@item --file-path +A colon separated list of directories or commands (starts with '|'). The path +is passed to the program specified in @option{--file-command} together with the selected +filename. +@end ftable +%end-doc +*/ + SSET (FilePath, "", "file-path", 0), + +/* %start-doc options "6 Commands" +@ftable @code +@item --rat-command +Command for reading a netlist. Sequence @code{%f} is replaced by the netlist filename. +@end ftable +%end-doc +*/ + SSET (RatCommand, "", "rat-command", "Command for reading a netlist"), + +/* %start-doc options "5 Paths" +@ftable @code +@item --font-path +A colon separated list of directories to search the default font. Defaults to +the default library path. +@end ftable +%end-doc +*/ + SSET (FontPath, PCBLIBPATH, "font-path", + "Colon separated list of directories to search the default font"), + +/* %start-doc options "1 General Options" +@ftable @code +@item --element-path +A colon separated list of directories or commands (starts with '|'). +The path is passed to the program specified in @option{--element-command}. +@end ftable +%end-doc +*/ + SSET(ElementPath, PCBLIBPATH, "element-path", + "A colon separated list of directories or commands (starts with '|')"), + +/* %start-doc options "5 Paths" +@ftable @code +@item --lib-path +A colon separated list of directories that will be passed to the commands specified +by @option{--element-command} and @option{--element-contents-command}. +@end ftable +%end-doc +*/ + SSET (LibraryPath, PCBLIBPATH, "lib-path", + "A colon separated list of directories"), + +/* %start-doc options "1 General Options" +@ftable @code +@item --action-script +If set, this file is executed at startup. +@end ftable +%end-doc +*/ + SSET (ScriptFilename, 0, "action-script", + "If set, this file is executed at startup"), + +/* %start-doc options "1 General Options" +@ftable @code +@item --action-string +If set, this string of actions is executed at startup. +@end ftable +%end-doc +*/ + SSET (ActionString, 0, "action-string", + "If set, this is executed at startup"), + +/* %start-doc options "1 General Options" +@ftable @code +@item --fab-author +Name of author to be put in the Gerber files. +@end ftable +%end-doc +*/ + SSET (FabAuthor, "", "fab-author", + "Name of author to be put in the Gerber files"), + +/* %start-doc options "1 General Options" +@ftable @code +@item --layer-stack +Initial layer stackup, for setting up an export. A comma separated list of layer +names, layer numbers and layer groups. +@end ftable +%end-doc +*/ + SSET (InitialLayerStack, "", "layer-stack", + "Initial layer stackup, for setting up an export."), + + SSET (MakeProgram, NULL, "make-program", + "Sets the name and optionally full path to a make(3) program"), + SSET (GnetlistProgram, NULL, "gnetlist", + "Sets the name and optionally full path to the gnetlist(3) program"), + +/* %start-doc options "2 General GUI Options" +@ftable @code +@item --pinout-offset-x +Horizontal offset of the pin number display. Defaults to @code{100mil}. +@end ftable +%end-doc +*/ + CSET (PinoutOffsetX, MIL_TO_COORD(1), "pinout-offset-x", + "Horizontal offset of the pin number display in mil"), + +/* %start-doc options "2 General GUI Options" +@ftable @code +@item --pinout-offset-y +Vertical offset of the pin number display. Defaults to @code{100mil}. +@end ftable +%end-doc +*/ + CSET (PinoutOffsetY, MIL_TO_COORD(1), "pinout-offset-y", + "Vertical offset of the pin number display in mil"), + +/* %start-doc options "2 General GUI Options" +@ftable @code +@item --pinout-text-offset-x +Horizontal offset of the pin name display. Defaults to @code{800mil}. +@end ftable +%end-doc +*/ + CSET (PinoutTextOffsetX, MIL_TO_COORD(8), "pinout-text-offset-x", + "Horizontal offset of the pin name display in mil"), + +/* %start-doc options "2 General GUI Options" +@ftable @code +@item --pinout-text-offset-y +Vertical offset of the pin name display. Defaults to @code{-100mil}. +@end ftable +%end-doc +*/ + CSET (PinoutTextOffsetY, MIL_TO_COORD(-1), "pinout-text-offset-y", + "Vertical offset of the pin name display in mil"), + +/* %start-doc options "2 General GUI Options" +@ftable @code +@item --draw-grid +If set, draw the grid at start-up. +@end ftable +%end-doc +*/ + BSET (DrawGrid, 0, "draw-grid", "If set, draw the grid at start-up"), + +/* %start-doc options "2 General GUI Options" +@ftable @code +@item --clear-line +If set, new lines clear polygons. +@end ftable +%end-doc +*/ + BSET (ClearLine, 1, "clear-line", "If set, new lines clear polygons"), + +/* %start-doc options "2 General GUI Options" +@ftable @code +@item --full-poly +If set, new polygons are full ones. +@end ftable +%end-doc +*/ + BSET (FullPoly, 0, "full-poly", 0), + +/* %start-doc options "2 General GUI Options" +@ftable @code +@item --unique-names +If set, you will not be permitted to change the name of an component to match that +of another component. +@end ftable +%end-doc +*/ + BSET (UniqueNames, 1, "unique-names", "Prevents identical component names"), + +/* %start-doc options "2 General GUI Options" +@ftable @code +@item --snap-pin +If set, pin centers and pad end points are treated as additional grid points +that the cursor can snap to. +@end ftable +%end-doc +*/ + BSET (SnapPin, 1, "snap-pin", + "If set, the cursor snaps to pads and pin centers"), + +/* %start-doc options "1 General Options" +@ftable @code +@item --save-last-command +If set, the last user command is saved. +@end ftable +%end-doc +*/ + BSET (SaveLastCommand, 0, "save-last-command", 0), + +/* %start-doc options "1 General Options" +@ftable @code +@item --save-in-tmp +If set, all data which would otherwise be lost are saved in a temporary file +@file{/tmp/PCB.%i.save} . Sequence @samp{%i} is replaced by the process ID. +@end ftable +%end-doc +*/ + BSET (SaveInTMP, 0, "save-in-tmp", + "When set, all data which would otherwise be lost are saved in /tmp"), + +/* %start-doc options "2 General GUI Options" +@ftable @code +@item --all-direction-lines +Allow all directions, when drawing new lines. +@end ftable +%end-doc +*/ + BSET (AllDirectionLines, 0, "all-direction-lines", + "Allow all directions, when drawing new lines"), + +/* %start-doc options "2 General GUI Options" +@ftable @code +@item --show-number +Pinout shows number. +@end ftable +%end-doc +*/ + BSET (ShowNumber, 0, "show-number", "Pinout shows number"), + +/* %start-doc options "1 General Options" +@ftable @code +@item --reset-after-element +If set, all found connections are reset before a new component is scanned. +@end ftable +%end-doc +*/ + BSET (ResetAfterElement, 1, "reset-after-element", + "If set, all found connections are reset before a new component is scanned"), + +/* %start-doc options "1 General Options" +@ftable @code +@item --ring-bell-finished +Execute the bell command when all rats are routed. +@end ftable +%end-doc +*/ + BSET (RingBellWhenFinished, 0, "ring-bell-finished", + "Execute the bell command when all rats are routed"), +}; + +REGISTER_ATTRIBUTES (main_attribute_list) +/* ---------------------------------------------------------------------- + * post-process settings. + */ + static void settings_post_process () +{ + char *tmps; + + if (Settings.LibraryCommand != NULL && + Settings.LibraryCommand[0] != '\0' && + Settings.LibraryCommand[0] != PCB_DIR_SEPARATOR_C && + Settings.LibraryCommand[0] != '.') + { + Settings.LibraryCommand + = + Concat (Settings.LibraryCommandDir, PCB_DIR_SEPARATOR_S, + Settings.LibraryCommand, + NULL); + } + if (Settings.LibraryContentsCommand != NULL && + Settings.LibraryContentsCommand[0] != '\0' && + Settings.LibraryContentsCommand[0] != PCB_DIR_SEPARATOR_C && + Settings.LibraryContentsCommand[0] != '.') + { + Settings.LibraryContentsCommand + = + Concat (Settings.LibraryCommandDir, PCB_DIR_SEPARATOR_S, + Settings.LibraryContentsCommand, NULL); + } + + if (Settings.LineThickness > MAX_LINESIZE + || Settings.LineThickness < MIN_LINESIZE) + Settings.LineThickness = MIL_TO_COORD(10); + + if (Settings.ViaThickness > MAX_PINORVIASIZE + || Settings.ViaThickness < MIN_PINORVIASIZE) + Settings.ViaThickness = MIL_TO_COORD(40); + + if (Settings.ViaDrillingHole <= 0) + Settings.ViaDrillingHole = + DEFAULT_DRILLINGHOLE * Settings.ViaThickness / 100; + + Settings.MaxWidth = CLAMP (Settings.MaxWidth, MIN_SIZE, MAX_COORD); + Settings.MaxHeight = CLAMP (Settings.MaxHeight, MIN_SIZE, MAX_COORD); + + ParseRouteString (Settings.Routes, &Settings.RouteStyle[0], "cmil"); + + /* + * Make sure we have settings for some various programs we may wish + * to call + */ + if (Settings.MakeProgram == NULL) { + tmps = getenv ("PCB_MAKE_PROGRAM"); + if (tmps != NULL) + Settings.MakeProgram = strdup (tmps); + } + if (Settings.MakeProgram == NULL) { + Settings.MakeProgram = strdup ("make"); + } + + if (Settings.GnetlistProgram == NULL) { + tmps = getenv ("PCB_GNETLIST"); + if (tmps != NULL) + Settings.GnetlistProgram = strdup (tmps); + } + if (Settings.GnetlistProgram == NULL) { + Settings.GnetlistProgram = strdup ("gnetlist"); + } + + if (grid_units) + Settings.grid_unit = get_unit_struct (grid_units); + if (!grid_units || Settings.grid_unit == NULL) + Settings.grid_unit = get_unit_struct ("mil"); + + Settings.increments = get_increments_struct (Settings.grid_unit->suffix); +} + +/* ---------------------------------------------------------------------- + * Print help or version messages. + */ + +static void +print_version () +{ + printf ("PCB version %s\n", VERSION); + exit (0); +} + +/* ---------------------------------------------------------------------- + * Figure out the canonical name of the executed program + * and fix up the defaults for various paths + */ +char *bindir = NULL; +char *exec_prefix = NULL; +char *pcblibdir = NULL; +char *pcblibpath = NULL; +char *pcbtreedir = NULL; +char *pcbtreepath = NULL; +char *homedir = NULL; + +static void +InitPaths (char *argv0) +{ + size_t l; + int i; + int haspath; + char *t1, *t2; + int found_bindir = 0; + + /* see if argv0 has enough of a path to let lrealpath give the + * real path. This should be the case if you invoke pcb with + * something like /usr/local/bin/pcb or ./pcb or ./foo/pcb + * but if you just use pcb and it exists in your path, you'll + * just get back pcb again. + */ + + haspath = 0; + for (i = 0; i < strlen (argv0) ; i++) + { + if (argv0[i] == PCB_DIR_SEPARATOR_C) + haspath = 1; + } + +#ifdef DEBUG + printf ("InitPaths (%s): haspath = %d\n", argv0, haspath); +#endif + + if (haspath) + { + bindir = strdup (lrealpath (argv0)); + found_bindir = 1; + } + else + { + char *path, *p, *tmps; + struct stat sb; + int r; + + tmps = getenv ("PATH"); + + if (tmps != NULL) + { + path = strdup (tmps); + + /* search through the font path for a font file */ + for (p = strtok (path, PCB_PATH_DELIMETER); p && *p; + p = strtok (NULL, PCB_PATH_DELIMETER)) + { +#ifdef DEBUG + printf ("Looking for %s in %s\n", argv0, p); +#endif + if ( (tmps = (char *)malloc ( (strlen (argv0) + strlen (p) + 2) * sizeof (char))) == NULL ) + { + fprintf (stderr, "InitPaths(): malloc failed\n"); + exit (1); + } + sprintf (tmps, "%s%s%s", p, PCB_DIR_SEPARATOR_S, argv0); + r = stat (tmps, &sb); + if (r == 0) + { +#ifdef DEBUG + printf ("Found it: \"%s\"\n", tmps); +#endif + bindir = lrealpath (tmps); + found_bindir = 1; + free (tmps); + break; + } + free (tmps); + } + free (path); + } + } + +#ifdef DEBUG + printf ("InitPaths(): bindir = \"%s\"\n", bindir); +#endif + + if (found_bindir) + { + /* strip off the executible name leaving only the path */ + t2 = NULL; + t1 = strchr (bindir, PCB_DIR_SEPARATOR_C); + while (t1 != NULL && *t1 != '\0') + { + t2 = t1; + t1 = strchr (t2 + 1, PCB_DIR_SEPARATOR_C); + } + if (t2 != NULL) + *t2 = '\0'; + +#ifdef DEBUG + printf ("After stripping off the executible name, we found\n"); + printf ("bindir = \"%s\"\n", bindir); +#endif + } + else + { + /* we have failed to find out anything from argv[0] so fall back to the original + * install prefix + */ + bindir = strdup (BINDIR); + } + + /* now find the path to exec_prefix */ + l = strlen (bindir) + 1 + strlen (BINDIR_TO_EXECPREFIX) + 1; + if ( (exec_prefix = (char *) malloc (l * sizeof (char) )) == NULL ) + { + fprintf (stderr, "InitPaths(): malloc failed\n"); + exit (1); + } + sprintf (exec_prefix, "%s%s%s", bindir, PCB_DIR_SEPARATOR_S, + BINDIR_TO_EXECPREFIX); + + /* now find the path to PCBLIBDIR */ + l = strlen (bindir) + 1 + strlen (BINDIR_TO_PCBLIBDIR) + 1; + if ( (pcblibdir = (char *) malloc (l * sizeof (char) )) == NULL ) + { + fprintf (stderr, "InitPaths(): malloc failed\n"); + exit (1); + } + sprintf (pcblibdir, "%s%s%s", bindir, PCB_DIR_SEPARATOR_S, + BINDIR_TO_PCBLIBDIR); + + /* and the path to PCBTREEDIR */ + l = strlen (bindir) + 1 + strlen (BINDIR_TO_PCBTREEDIR) + 1; + if ( (pcbtreedir = (char *) malloc (l * sizeof (char) )) == NULL ) + { + fprintf (stderr, "InitPaths(): malloc failed\n"); + exit (1); + } + sprintf (pcbtreedir, "%s%s%s", bindir, PCB_DIR_SEPARATOR_S, + BINDIR_TO_PCBTREEDIR); + + /* and the search path including PCBLIBDIR */ + l = strlen (pcblibdir) + 3; + if ( (pcblibpath = (char *) malloc (l * sizeof (char) )) == NULL ) + { + fprintf (stderr, "InitPaths(): malloc failed\n"); + exit (1); + } + sprintf (pcblibpath, ".%s%s", PCB_PATH_DELIMETER, pcblibdir); + + /* and the newlib search path */ + l = strlen (pcblibdir) + 1 + strlen (pcbtreedir) + + strlen ("pcblib-newlib") + 2; + if ( (pcbtreepath = (char *) malloc (l * sizeof (char) )) == NULL ) + { + fprintf (stderr, "InitPaths(): malloc failed\n"); + exit (1); + } + sprintf (pcbtreepath, "%s%s%s%spcblib-newlib", pcbtreedir, + PCB_PATH_DELIMETER, pcblibdir, + PCB_DIR_SEPARATOR_S); + +#ifdef DEBUG + printf ("bindir = %s\n", bindir); + printf ("pcblibdir = %s\n", pcblibdir); + printf ("pcblibpath = %s\n", pcblibpath); + printf ("pcbtreedir = %s\n", pcbtreedir); + printf ("pcbtreepath = %s\n", pcbtreepath); +#endif + + l = sizeof (main_attribute_list) / sizeof (main_attribute_list[0]); + for (i = 0; i < l ; i++) + { + if (NSTRCMP (main_attribute_list[i].name, "lib-command-dir") == 0) + { + main_attribute_list[i].default_val.str_value = pcblibdir; + } + + if ( (NSTRCMP (main_attribute_list[i].name, "font-path") == 0) + || (NSTRCMP (main_attribute_list[i].name, "element-path") == 0) + || (NSTRCMP (main_attribute_list[i].name, "lib-path") == 0) ) + { + main_attribute_list[i].default_val.str_value = pcblibpath; + } + + if (NSTRCMP (main_attribute_list[i].name, "lib-newlib") == 0) + { + main_attribute_list[i].default_val.str_value = pcbtreepath; + } + + } + + { + char *tmps; + + tmps = getenv ("HOME"); + + if (tmps == NULL) { + tmps = getenv ("USERPROFILE"); + } + + if (tmps != NULL) { + homedir = strdup (tmps); + } else { + homedir = NULL; + } + + } +} + +/* ---------------------------------------------------------------------- + * main program + */ + +char *program_name = 0; +char *program_basename = 0; +char *program_directory = 0; + +#include "dolists.h" + +int +main (int argc, char *argv[]) +{ + int i; + + /* init application: + * - make program name available for error handlers + * - evaluate special options + * - initialize toplevel shell and resources + * - create an empty PCB with default symbols + * - initialize all other widgets + * - update screen and get size of drawing area + * - evaluate command-line arguments + * - register 'call on exit()' function + */ + +#include "core_lists.h" + setbuf (stdout, 0); + InitPaths (argv[0]); + + bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR); + textdomain(GETTEXT_PACKAGE); + bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8"); + setlocale(LC_ALL,""); + + srand ( time(NULL) ); /* Set seed for rand() */ + + initialize_units(); + polygon_init (); + hid_init (); + + hid_load_settings (); + + program_name = argv[0]; + program_basename = strrchr (program_name, PCB_DIR_SEPARATOR_C); + if (program_basename) + { + program_directory = strdup (program_name); + *strrchr (program_directory, PCB_DIR_SEPARATOR_C) = 0; + program_basename++; + } + else + { + program_directory = "."; + program_basename = program_name; + } + Progname = program_basename; + + /* Print usage or version if requested. Then exit. */ + if (argc > 1 && + (strcmp (argv[1], "-h") == 0 || + strcmp (argv[1], "-?") == 0 || + strcmp (argv[1], "--help") == 0)) + usage (); + if (argc > 1 && strcmp (argv[1], "-V") == 0) + print_version (); + /* Export pcb from command line if requested. */ + if (argc > 1 && strcmp (argv[1], "-p") == 0) + { + exporter = gui = hid_find_printer (); + argc--; + argv++; + } + else if (argc > 2 && strcmp (argv[1], "-x") == 0) + { + exporter = gui = hid_find_exporter (argv[2]); + argc -= 2; + argv += 2; + } + /* Otherwise start GUI. */ + else + gui = hid_find_gui (); + + /* Exit with error if GUI failed to start. */ + if (!gui) + exit (1); + + /* Set up layers. */ + for (i = 0; i < MAX_LAYER; i++) + { + char buf[20]; + sprintf (buf, "signal%d", i + 1); + Settings.DefaultLayerName[i] = strdup (buf); + Settings.LayerColor[i] = "#c49350"; + Settings.LayerSelectedColor[i] = "#00ffff"; + } + + gui->parse_arguments (&argc, &argv); + + if (show_help || (argc > 1 && argv[1][0] == '-')) + usage (); + if (show_version) + print_version (); + if (show_defaults) + print_defaults (); + if (show_copyright) + copyright (); + + settings_post_process (); + + + if (show_actions) + { + print_actions (); + exit (0); + } + + if (do_dump_actions) + { + extern void dump_actions (void); + dump_actions (); + exit (0); + } + + /* Create a new PCB object in memory */ + PCB = CreateNewPCB (true); + PCB->Data->LayerN = DEF_LAYER; + ParseGroupString (Settings.Groups, &PCB->LayerGroups, DEF_LAYER); + /* Add silk layers to newly created PCB */ + CreateNewPCBPost (PCB, 1); + if (argc > 1) + command_line_pcb = argv[1]; + + ResetStackAndVisibility (); + + if (gui->gui) + InitCrosshair (); + InitHandler (); + InitBuffers (); + SetMode (ARROW_MODE); + + if (command_line_pcb) + { + /* keep filename even if initial load command failed; + * file might not exist + */ + if (LoadPCB (command_line_pcb)) + PCB->Filename = strdup (command_line_pcb); + } + + if (Settings.InitialLayerStack + && Settings.InitialLayerStack[0]) + { + LayerStringToLayerStack (Settings.InitialLayerStack); + } + + /* This must be called before any other atexit functions + * are registered, as it configures an atexit function to + * clean up and free various items of allocated memory, + * and must be the last last atexit function to run. + */ + leaky_init (); + + /* Register a function to be called when the program terminates. + * This makes sure that data is saved even if LEX/YACC routines + * abort the program. + * If the OS doesn't have at least one of them, + * the critical sections will be handled by parse_l.l + */ + atexit (EmergencySave); + + /* read the library file and display it if it's not empty + */ + if (!ReadLibraryContents () && Library.MenuN) + hid_action ("LibraryChanged"); + +#ifdef HAVE_LIBSTROKE + stroke_init (); +#endif + + if (Settings.ScriptFilename) + { + Message (_("Executing startup script file %s\n"), + Settings.ScriptFilename); + hid_actionl ("ExecuteFile", Settings.ScriptFilename, NULL); + } + if (Settings.ActionString) + { + Message (_("Executing startup action %s\n"), Settings.ActionString); + hid_parse_actions (Settings.ActionString); + } + + if (gui->printer || gui->exporter) + { + gui->do_export (0); + exit (0); + } + +#if HAVE_DBUS + pcb_dbus_setup(); +#endif + + EnableAutosave (); + +#ifdef DEBUG + printf ("Settings.LibraryCommandDir = \"%s\"\n", + Settings.LibraryCommandDir); + printf ("Settings.FontPath = \"%s\"\n", + Settings.FontPath); + printf ("Settings.ElementPath = \"%s\"\n", + Settings.ElementPath); + printf ("Settings.LibraryPath = \"%s\"\n", + Settings.LibraryPath); + printf ("Settings.LibraryTree = \"%s\"\n", + Settings.LibraryTree); + printf ("Settings.MakeProgram = \"%s\"\n", + UNKNOWN (Settings.MakeProgram)); + printf ("Settings.GnetlistProgram = \"%s\"\n", + UNKNOWN (Settings.GnetlistProgram)); +#endif + + gui->do_export (0); +#if HAVE_DBUS + pcb_dbus_finish(); +#endif + + return (0); +} + Index: trunk/.pc/applied-patches =================================================================== --- trunk/.pc/applied-patches (nonexistent) +++ trunk/.pc/applied-patches (revision 4) @@ -0,0 +1,9 @@ +fix_typo.diff +outdated_config.diff +fix_pan_action.diff +pcbtest_paths.diff +default_GtkFileChooser_cwd.diff +disable_hid_png3_test.diff +0001-Fixed-command-line-batch-output-for-some-exporters.patch +drop_check_global_included.patch +fix_CPPFLAGS.diff Index: trunk/.pc/default_GtkFileChooser_cwd.diff/po/POTFILES.skip =================================================================== --- trunk/.pc/default_GtkFileChooser_cwd.diff/po/POTFILES.skip (nonexistent) +++ trunk/.pc/default_GtkFileChooser_cwd.diff/po/POTFILES.skip (revision 4) @@ -0,0 +1 @@ +.pc/fix_pan_action.diff/src/hid/gtk/gtkhid-main.c Index: trunk/.pc/default_GtkFileChooser_cwd.diff/src/hid/gtk/gtkhid-main.c =================================================================== --- trunk/.pc/default_GtkFileChooser_cwd.diff/src/hid/gtk/gtkhid-main.c (nonexistent) +++ trunk/.pc/default_GtkFileChooser_cwd.diff/src/hid/gtk/gtkhid-main.c (revision 4) @@ -0,0 +1,2190 @@ +/* $Id$ */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include +#ifdef HAVE_STRING_H +#include +#endif +#include +#include + + +#include "action.h" +#include "crosshair.h" +#include "error.h" +#include "../hidint.h" +#include "gui.h" +#include "hid/common/hidnogui.h" +#include "hid/common/draw_helpers.h" +#include "pcb-printf.h" + +#ifdef HAVE_LIBDMALLOC +#include +#endif + + +RCSID ("$Id$"); + + +static void +pan_common (GHidPort *port) +{ + int event_x, event_y; + + /* We need to fix up the PCB coordinates corresponding to the last + * event so convert it back to event coordinates temporarily. */ + ghid_pcb_to_event_coords (gport->pcb_x, gport->pcb_y, &event_x, &event_y); + + /* Don't pan so far the board is completely off the screen */ + port->view.x0 = MAX (-port->view.width, port->view.x0); + port->view.y0 = MAX (-port->view.height, port->view.y0); + port->view.x0 = MIN ( port->view.x0, PCB->MaxWidth); + port->view.y0 = MIN ( port->view.y0, PCB->MaxHeight); + + /* Fix up noted event coordinates to match where we clamped. Alternatively + * we could call ghid_note_event_location (NULL); to get a new pointer + * location, but this costs us an xserver round-trip (on X11 platforms) + */ + ghid_event_to_pcb_coords (event_x, event_y, &gport->pcb_x, &gport->pcb_y); + + ghidgui->adjustment_changed_holdoff = TRUE; + gtk_range_set_value (GTK_RANGE (ghidgui->h_range), gport->view.x0); + gtk_range_set_value (GTK_RANGE (ghidgui->v_range), gport->view.y0); + ghidgui->adjustment_changed_holdoff = FALSE; + + ghid_port_ranges_changed(); +} + +static void +ghid_pan_view_abs (Coord pcb_x, Coord pcb_y, int widget_x, int widget_y) +{ + gport->view.x0 = SIDE_X (pcb_x) - widget_x * gport->view.coord_per_px; + gport->view.y0 = SIDE_Y (pcb_y) - widget_y * gport->view.coord_per_px; + + pan_common (gport); +} + +void +ghid_pan_view_rel (Coord dx, Coord dy) +{ + gport->view.x0 += dx; + gport->view.y0 += dy; + + pan_common (gport); +} + + +/* gport->view.coord_per_px: + * zoom value is PCB units per screen pixel. Larger numbers mean zooming + * out - the largest value means you are looking at the whole board. + * + * gport->view_width and gport->view_height are in PCB coordinates + */ + +#define ALLOW_ZOOM_OUT_BY 10 /* Arbitrary, and same as the lesstif HID */ +static void +ghid_zoom_view_abs (Coord center_x, Coord center_y, double new_zoom) +{ + double min_zoom, max_zoom; + double xtmp, ytmp; + + /* Limit the "minimum" zoom constant (maximum zoom), at 1 pixel per PCB + * unit, and set the "maximum" zoom constant (minimum zoom), such that + * the entire board just fits inside the viewport + */ + min_zoom = 1; + max_zoom = MAX (PCB->MaxWidth / gport->width, + PCB->MaxHeight / gport->height) * ALLOW_ZOOM_OUT_BY; + new_zoom = MIN (MAX (min_zoom, new_zoom), max_zoom); + + if (gport->view.coord_per_px == new_zoom) + return; + + xtmp = (SIDE_X (center_x) - gport->view.x0) / (double)gport->view.width; + ytmp = (SIDE_Y (center_y) - gport->view.y0) / (double)gport->view.height; + + gport->view.coord_per_px = new_zoom; + pixel_slop = new_zoom; + ghid_port_ranges_scale (); + + gport->view.x0 = SIDE_X (center_x) - xtmp * gport->view.width; + gport->view.y0 = SIDE_Y (center_y) - ytmp * gport->view.height; + + pan_common (gport); + + ghid_set_status_line_label (); +} + +static void +ghid_zoom_view_rel (Coord center_x, Coord center_y, double factor) +{ + ghid_zoom_view_abs (center_x, center_y, gport->view.coord_per_px * factor); +} + +static void +ghid_zoom_view_fit (void) +{ + ghid_pan_view_abs (SIDE_X (0), SIDE_Y (0), 0, 0); + ghid_zoom_view_abs (SIDE_X (0), SIDE_Y (0), + MAX (PCB->MaxWidth / gport->width, + PCB->MaxHeight / gport->height)); +} + +static void +ghid_flip_view (Coord center_x, Coord center_y, bool flip_x, bool flip_y) +{ + int widget_x, widget_y; + + /* Work out where on the screen the flip point is */ + ghid_pcb_to_event_coords (center_x, center_y, &widget_x, &widget_y); + + gport->view.flip_x = gport->view.flip_x != flip_x; + gport->view.flip_y = gport->view.flip_y != flip_y; + + /* Pan the board so the center location remains in the same place */ + ghid_pan_view_abs (center_x, center_y, widget_x, widget_y); + + ghid_invalidate_all (); +} + +/* ------------------------------------------------------------ */ + +static const char zoom_syntax[] = +"Zoom()\n" +"Zoom(factor)"; + + +static const char zoom_help[] = +N_("Various zoom factor changes."); + +/* %start-doc actions Zoom +Changes the zoom (magnification) of the view of the board. If no +arguments are passed, the view is scaled such that the board just fits +inside the visible window (i.e. ``view all''). Otherwise, +@var{factor} specifies a change in zoom factor. It may be prefixed by +@code{+}, @code{-}, or @code{=} to change how the zoom factor is +modified. The @var{factor} is a floating point number, such as +@code{1.5} or @code{0.75}. + +@table @code + +@item +@var{factor} +Values greater than 1.0 cause the board to be drawn smaller; more of +the board will be visible. Values between 0.0 and 1.0 cause the board +to be drawn bigger; less of the board will be visible. + +@item -@var{factor} +Values greater than 1.0 cause the board to be drawn bigger; less of +the board will be visible. Values between 0.0 and 1.0 cause the board +to be drawn smaller; more of the board will be visible. + +@item =@var{factor} + +The @var{factor} is an absolute zoom factor; the unit for this value +is "PCB units per screen pixel". Since PCB units are 0.01 mil, a +@var{factor} of 1000 means 10 mils (0.01 in) per pixel, or 100 DPI, +about the actual resolution of most screens - resulting in an "actual +size" board. Similarly, a @var{factor} of 100 gives you a 10x actual +size. + +@end table + +Note that zoom factors of zero are silently ignored. + + + +%end-doc */ + +static int +Zoom (int argc, char **argv, Coord x, Coord y) +{ + const char *vp; + double v; + + if (argc > 1) + AFAIL (zoom); + + if (argc < 1) + { + ghid_zoom_view_fit (); + return 0; + } + + vp = argv[0]; + if (*vp == '+' || *vp == '-' || *vp == '=') + vp++; + v = g_ascii_strtod (vp, 0); + if (v <= 0) + return 1; + switch (argv[0][0]) + { + case '-': + ghid_zoom_view_rel (x, y, 1 / v); + break; + default: + case '+': + ghid_zoom_view_rel (x, y, v); + break; + case '=': + ghid_zoom_view_abs (x, y, v); + break; + } + + return 0; +} + +/* ------------------------------------------------------------ */ + +void +ghid_calibrate (double xval, double yval) +{ + printf (_("ghid_calibrate() -- not implemented\n")); +} + +static int ghid_gui_is_up = 0; + +void +ghid_notify_gui_is_up () +{ + ghid_gui_is_up = 1; +} + +int +ghid_shift_is_pressed () +{ + GdkModifierType mask; + GHidPort *out = &ghid_port; + + if( ! ghid_gui_is_up ) + return 0; + + gdk_window_get_pointer (gtk_widget_get_window (out->drawing_area), + NULL, NULL, &mask); + return (mask & GDK_SHIFT_MASK) ? TRUE : FALSE; +} + +int +ghid_control_is_pressed () +{ + GdkModifierType mask; + GHidPort *out = &ghid_port; + + if( ! ghid_gui_is_up ) + return 0; + + gdk_window_get_pointer (gtk_widget_get_window (out->drawing_area), + NULL, NULL, &mask); + return (mask & GDK_CONTROL_MASK) ? TRUE : FALSE; +} + +int +ghid_mod1_is_pressed () +{ + GdkModifierType mask; + GHidPort *out = &ghid_port; + + if( ! ghid_gui_is_up ) + return 0; + + gdk_window_get_pointer (gtk_widget_get_window (out->drawing_area), + NULL, NULL, &mask); +#ifdef __APPLE__ + return (mask & ( 1 << 13 ) ) ? TRUE : FALSE; // The option key is not MOD1, although it should be... +#else + return (mask & GDK_MOD1_MASK) ? TRUE : FALSE; +#endif +} + +void +ghid_set_crosshair (int x, int y, int action) +{ + GdkDisplay *display; + GdkScreen *screen; + int offset_x, offset_y; + int widget_x, widget_y; + int pointer_x, pointer_y; + Coord pcb_x, pcb_y; + + if (gport->crosshair_x != x || gport->crosshair_y != y) + { + ghid_set_cursor_position_labels (); + gport->crosshair_x = x; + gport->crosshair_y = y; + + /* FIXME - does this trigger the idle_proc stuff? It is in the + * lesstif HID. Maybe something is needed here? + * + * need_idle_proc (); + */ + } + + if (action != HID_SC_PAN_VIEWPORT && + action != HID_SC_WARP_POINTER) + return; + + /* Find out where the drawing area is on the screen. gdk_display_get_pointer + * and gdk_display_warp_pointer work relative to the whole display, whilst + * our coordinates are relative to the drawing area origin. + */ + gdk_window_get_origin (gtk_widget_get_window (gport->drawing_area), + &offset_x, &offset_y); + display = gdk_display_get_default (); + + switch (action) { + case HID_SC_PAN_VIEWPORT: + /* Pan the board in the viewport so that the crosshair (who's location + * relative on the board was set above) lands where the pointer is. + * We pass the request to pan a particular point on the board to a + * given widget coordinate of the viewport into the rendering code + */ + + /* Find out where the pointer is relative to the display */ + gdk_display_get_pointer (display, NULL, &pointer_x, &pointer_y, NULL); + + widget_x = pointer_x - offset_x; + widget_y = pointer_y - offset_y; + + ghid_event_to_pcb_coords (widget_x, widget_y, &pcb_x, &pcb_y); + ghid_pan_view_abs (pcb_x, pcb_y, widget_x, widget_y); + + /* Just in case we couldn't pan the board the whole way, + * we warp the pointer to where the crosshair DID land. + */ + /* Fall through */ + + case HID_SC_WARP_POINTER: + screen = gdk_display_get_default_screen (display); + + ghid_pcb_to_event_coords (x, y, &widget_x, &widget_y); + + pointer_x = offset_x + widget_x; + pointer_y = offset_y + widget_y; + + gdk_display_warp_pointer (display, screen, pointer_x, pointer_y); + + break; + } +} + +typedef struct +{ + void (*func) (hidval); + guint id; + hidval user_data; +} +GuiTimer; + + /* We need a wrapper around the hid timer because a gtk timer needs + | to return FALSE else the timer will be restarted. + */ +static gboolean +ghid_timer (GuiTimer * timer) +{ + (*timer->func) (timer->user_data); + ghid_mode_cursor (Settings.Mode); + return FALSE; /* Turns timer off */ +} + +hidval +ghid_add_timer (void (*func) (hidval user_data), + unsigned long milliseconds, hidval user_data) +{ + GuiTimer *timer = g_new0 (GuiTimer, 1); + hidval ret; + + timer->func = func; + timer->user_data = user_data; + timer->id = g_timeout_add (milliseconds, (GSourceFunc) ghid_timer, timer); + ret.ptr = (void *) timer; + return ret; +} + +void +ghid_stop_timer (hidval timer) +{ + void *ptr = timer.ptr; + + g_source_remove (((GuiTimer *) ptr)->id); + g_free( ptr ); +} + +typedef struct +{ + void (*func) ( hidval, int, unsigned int, hidval ); + hidval user_data; + int fd; + GIOChannel *channel; + gint id; +} +GuiWatch; + + /* We need a wrapper around the hid file watch to pass the correct flags + */ +static gboolean +ghid_watch (GIOChannel *source, GIOCondition condition, gpointer data) +{ + unsigned int pcb_condition = 0; + hidval x; + GuiWatch *watch = (GuiWatch*)data; + + if (condition & G_IO_IN) + pcb_condition |= PCB_WATCH_READABLE; + if (condition & G_IO_OUT) + pcb_condition |= PCB_WATCH_WRITABLE; + if (condition & G_IO_ERR) + pcb_condition |= PCB_WATCH_ERROR; + if (condition & G_IO_HUP) + pcb_condition |= PCB_WATCH_HANGUP; + + x.ptr = (void *) watch; + watch->func (x, watch->fd, pcb_condition, watch->user_data); + ghid_mode_cursor (Settings.Mode); + + return TRUE; /* Leave watch on */ +} + +hidval +ghid_watch_file (int fd, unsigned int condition, void (*func) (hidval watch, int fd, unsigned int condition, hidval user_data), + hidval user_data) +{ + GuiWatch *watch = g_new0 (GuiWatch, 1); + hidval ret; + unsigned int glib_condition = 0; + + if (condition & PCB_WATCH_READABLE) + glib_condition |= G_IO_IN; + if (condition & PCB_WATCH_WRITABLE) + glib_condition |= G_IO_OUT; + if (condition & PCB_WATCH_ERROR) + glib_condition |= G_IO_ERR; + if (condition & PCB_WATCH_HANGUP) + glib_condition |= G_IO_HUP; + + watch->func = func; + watch->user_data = user_data; + watch->fd = fd; + watch->channel = g_io_channel_unix_new( fd ); + watch->id = g_io_add_watch( watch->channel, (GIOCondition)glib_condition, ghid_watch, watch ); + + ret.ptr = (void *) watch; + return ret; +} + +void +ghid_unwatch_file (hidval data) +{ + GuiWatch *watch = (GuiWatch*)data.ptr; + + g_io_channel_shutdown( watch->channel, TRUE, NULL ); + g_io_channel_unref( watch->channel ); + g_free( watch ); +} + +typedef struct +{ + GSource source; + void (*func) (hidval user_data); + hidval user_data; +} BlockHookSource; + +static gboolean ghid_block_hook_prepare (GSource *source, + gint *timeout); +static gboolean ghid_block_hook_check (GSource *source); +static gboolean ghid_block_hook_dispatch (GSource *source, + GSourceFunc callback, + gpointer user_data); + +static GSourceFuncs ghid_block_hook_funcs = { + ghid_block_hook_prepare, + ghid_block_hook_check, + ghid_block_hook_dispatch, + NULL // No destroy notification +}; + +static gboolean +ghid_block_hook_prepare (GSource *source, + gint *timeout) +{ + hidval data = ((BlockHookSource *)source)->user_data; + ((BlockHookSource *)source)->func( data ); + return FALSE; +} + +static gboolean +ghid_block_hook_check (GSource *source) +{ + return FALSE; +} + +static gboolean +ghid_block_hook_dispatch (GSource *source, + GSourceFunc callback, + gpointer user_data) +{ + return FALSE; +} + +static hidval +ghid_add_block_hook (void (*func) (hidval data), + hidval user_data) +{ + hidval ret; + BlockHookSource *source; + + source = (BlockHookSource *)g_source_new (&ghid_block_hook_funcs, sizeof( BlockHookSource )); + + source->func = func; + source->user_data = user_data; + + g_source_attach ((GSource *)source, NULL); + + ret.ptr = (void *) source; + return ret; +} + +static void +ghid_stop_block_hook (hidval mlpoll) +{ + GSource *source = (GSource *)mlpoll.ptr; + g_source_destroy( source ); +} + +int +ghid_confirm_dialog (char *msg, ...) +{ + int rv = 0; + va_list ap; + char *cancelmsg = NULL, *okmsg = NULL; + static gint x = -1, y = -1; + GtkWidget *dialog; + GHidPort *out = &ghid_port; + + va_start (ap, msg); + cancelmsg = va_arg (ap, char *); + okmsg = va_arg (ap, char *); + va_end (ap); + + if (!cancelmsg) + { + cancelmsg = _("_Cancel"); + okmsg = _("_OK"); + } + + dialog = gtk_message_dialog_new (GTK_WINDOW (out->top_window), + (GtkDialogFlags) (GTK_DIALOG_MODAL | + GTK_DIALOG_DESTROY_WITH_PARENT), + GTK_MESSAGE_QUESTION, + GTK_BUTTONS_NONE, + "%s", msg); + gtk_dialog_add_button (GTK_DIALOG (dialog), + cancelmsg, GTK_RESPONSE_CANCEL); + if (okmsg) + { + gtk_dialog_add_button (GTK_DIALOG (dialog), + okmsg, GTK_RESPONSE_OK); + } + + if(x != -1) { + gtk_window_move(GTK_WINDOW (dialog), x, y); + } + + if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_OK) + rv = 1; + + gtk_window_get_position(GTK_WINDOW (dialog), &x, &y); + + gtk_widget_destroy (dialog); + return rv; +} + +int +ghid_close_confirm_dialog () +{ + switch (ghid_dialog_close_confirm ()) + { + case GUI_DIALOG_CLOSE_CONFIRM_SAVE: + { + if (hid_actionl ("Save", NULL)) + { /* Save failed */ + return 0; /* Cancel */ + } else { + return 1; /* Close */ + } + } + case GUI_DIALOG_CLOSE_CONFIRM_NOSAVE: + { + return 1; /* Close */ + } + case GUI_DIALOG_CLOSE_CONFIRM_CANCEL: + default: + { + return 0; /* Cancel */ + } + } +} + +void +ghid_report_dialog (char *title, char *msg) +{ + ghid_dialog_report (title, msg); +} + +char * +ghid_prompt_for (const char *msg, const char *default_string) +{ + char *rv; + + rv = ghid_dialog_input (msg, default_string); + return rv; +} + +/* FIXME -- implement a proper file select dialog */ +#ifdef FIXME +char * +ghid_fileselect (const char *title, const char *descr, + char *default_file, char *default_ext, + const char *history_tag, int flags) +{ + char *rv; + + rv = ghid_dialog_input (title, default_file); + return rv; +} +#endif + +void +ghid_show_item (void *item) +{ + ghid_pinout_window_show (&ghid_port, (ElementTypePtr) item); +} + +void +ghid_beep () +{ + gdk_beep (); +} + +struct progress_dialog +{ + GtkWidget *dialog; + GtkWidget *message; + GtkWidget *progress; + gint response_id; + GMainLoop *loop; + gboolean destroyed; + gboolean started; + GTimer *timer; + + gulong response_handler; + gulong destroy_handler; + gulong delete_handler; +}; + +static void +run_response_handler (GtkDialog *dialog, + gint response_id, + gpointer data) +{ + struct progress_dialog *pd = data; + + pd->response_id = response_id; +} + +static gint +run_delete_handler (GtkDialog *dialog, + GdkEventAny *event, + gpointer data) +{ + struct progress_dialog *pd = data; + + pd->response_id = GTK_RESPONSE_DELETE_EVENT; + + return TRUE; /* Do not destroy */ +} + +static void +run_destroy_handler (GtkDialog *dialog, gpointer data) +{ + struct progress_dialog *pd = data; + + pd->destroyed = TRUE; +} + +static struct progress_dialog * +make_progress_dialog (void) +{ + struct progress_dialog *pd; + GtkWidget *content_area; + GtkWidget *alignment; + GtkWidget *vbox; + + pd = g_new0 (struct progress_dialog, 1); + pd->response_id = GTK_RESPONSE_NONE; + + pd->dialog = gtk_dialog_new_with_buttons (_("Progress"), + GTK_WINDOW (gport->top_window), + /* Modal so nothing else can get events whilst + the main mainloop isn't running */ + GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_STOCK_CANCEL, + GTK_RESPONSE_CANCEL, + NULL); + + gtk_window_set_deletable (GTK_WINDOW (pd->dialog), FALSE); + gtk_window_set_skip_pager_hint (GTK_WINDOW (pd->dialog), TRUE); + gtk_window_set_skip_taskbar_hint (GTK_WINDOW (pd->dialog), TRUE); + gtk_widget_set_size_request (pd->dialog, 300, -1); + + pd->message = gtk_label_new (NULL); + gtk_misc_set_alignment (GTK_MISC (pd->message), 0., 0.); + + pd->progress = gtk_progress_bar_new (); + gtk_widget_set_size_request (pd->progress, -1, 26); + + vbox = gtk_vbox_new (false, 0); + gtk_box_pack_start (GTK_BOX (vbox), pd->message, true, true, 8); + gtk_box_pack_start (GTK_BOX (vbox), pd->progress, false, true, 8); + + alignment = gtk_alignment_new (0., 0., 1., 1.); + gtk_alignment_set_padding (GTK_ALIGNMENT (alignment), 8, 8, 8, 8); + gtk_container_add (GTK_CONTAINER (alignment), vbox); + + content_area = gtk_dialog_get_content_area (GTK_DIALOG (pd->dialog)); + gtk_box_pack_start (GTK_BOX (content_area), alignment, true, true, 0); + + gtk_widget_show_all (alignment); + + g_object_ref (pd->dialog); + gtk_window_present (GTK_WINDOW (pd->dialog)); + + pd->response_handler = + g_signal_connect (pd->dialog, "response", + G_CALLBACK (run_response_handler), pd); + pd->delete_handler = + g_signal_connect (pd->dialog, "delete-event", + G_CALLBACK (run_delete_handler), pd); + pd->destroy_handler = + g_signal_connect (pd->dialog, "destroy", + G_CALLBACK (run_destroy_handler), pd); + + pd->loop = g_main_loop_new (NULL, FALSE); + pd->timer = g_timer_new (); + + return pd; +} + +static void +destroy_progress_dialog (struct progress_dialog *pd) +{ + if (pd == NULL) + return; + + if (!pd->destroyed) + { + g_signal_handler_disconnect (pd->dialog, pd->response_handler); + g_signal_handler_disconnect (pd->dialog, pd->delete_handler); + g_signal_handler_disconnect (pd->dialog, pd->destroy_handler); + } + + g_timer_destroy (pd->timer); + g_object_unref (pd->dialog); + g_main_loop_unref (pd->loop); + + gtk_widget_destroy (pd->dialog); + + pd->loop = NULL; + g_free (pd); +} + +static void +handle_progress_dialog_events (struct progress_dialog *pd) +{ + GMainContext * context = g_main_loop_get_context (pd->loop); + + /* Process events */ + while (g_main_context_pending (context)) + { + g_main_context_iteration (context, FALSE); + } +} + +#define MIN_TIME_SEPARATION (50./1000.) /* 50ms */ +static int +ghid_progress (int so_far, int total, const char *message) +{ + static struct progress_dialog *pd = NULL; + + /* If we are finished, destroy any dialog */ + if (so_far == 0 && total == 0 && message == NULL) + { + destroy_progress_dialog (pd); + pd = NULL; + return 0; + } + + if (pd == NULL) + pd = make_progress_dialog (); + + /* We don't want to keep the underlying process too busy whilst we + * process events. If we get called quickly after the last progress + * update, wait a little bit before we respond - perhaps the next + * time progress is reported. + + * The exception here is that we always want to process the first + * batch of events after having shown the dialog for the first time + */ + if (pd->started && g_timer_elapsed (pd->timer, NULL) < MIN_TIME_SEPARATION) + return 0; + + gtk_label_set_text (GTK_LABEL (pd->message), message); + gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (pd->progress), + (double)so_far / (double)total); + + handle_progress_dialog_events (pd); + g_timer_start (pd->timer); + + pd->started = TRUE; + + return (pd->response_id == GTK_RESPONSE_CANCEL || + pd->response_id == GTK_RESPONSE_DELETE_EVENT) ? 1 : 0; +} + +/* ---------------------------------------------------------------------- */ + + +typedef struct { + GtkWidget *del; + GtkWidget *w_name; + GtkWidget *w_value; +} AttrRow; + +static AttrRow *attr_row = 0; +static int attr_num_rows = 0; +static int attr_max_rows = 0; +static AttributeListType *attributes_list; +static GtkWidget *attributes_dialog, *attr_table; + +static void attributes_delete_callback (GtkWidget *w, void *v); + +#define GA_RESPONSE_REVERT 1 +#define GA_RESPONSE_NEW 2 + +static void +ghid_attr_set_table_size () +{ + gtk_table_resize (GTK_TABLE (attr_table), attr_num_rows > 0 ? attr_num_rows : 1, 3); +} + +static void +ghid_attributes_need_rows (int new_max) +{ + if (attr_max_rows < new_max) + { + if (attr_row) + attr_row = (AttrRow *) realloc (attr_row, new_max * sizeof(AttrRow)); + else + attr_row = (AttrRow *) malloc (new_max * sizeof(AttrRow)); + } + while (attr_max_rows < new_max) + { + /* add [attr_max_rows] */ + attr_row[attr_max_rows].del = gtk_button_new_with_label ("del"); + gtk_table_attach (GTK_TABLE (attr_table), attr_row[attr_max_rows].del, + 0, 1, + attr_max_rows, attr_max_rows+1, + (GtkAttachOptions)(GTK_FILL | GTK_EXPAND), + GTK_FILL, + 0, 0); + g_signal_connect (G_OBJECT (attr_row[attr_max_rows].del), "clicked", + G_CALLBACK (attributes_delete_callback), GINT_TO_POINTER (attr_max_rows) ); + + attr_row[attr_max_rows].w_name = gtk_entry_new (); + gtk_table_attach (GTK_TABLE (attr_table), attr_row[attr_max_rows].w_name, + 1, 2, + attr_max_rows, attr_max_rows+1, + (GtkAttachOptions)(GTK_FILL | GTK_EXPAND), + GTK_FILL, + 0, 0); + + attr_row[attr_max_rows].w_value = gtk_entry_new (); + gtk_table_attach (GTK_TABLE (attr_table), attr_row[attr_max_rows].w_value, + 2, 3, + attr_max_rows, attr_max_rows+1, + (GtkAttachOptions)(GTK_FILL | GTK_EXPAND), + GTK_FILL, + 0, 0); + + attr_max_rows ++; + } + + /* Manage any previously unused rows we now need to show. */ + while (attr_num_rows < new_max) + { + /* manage attr_num_rows */ + gtk_widget_show (attr_row[attr_num_rows].del); + gtk_widget_show (attr_row[attr_num_rows].w_name); + gtk_widget_show (attr_row[attr_num_rows].w_value); + attr_num_rows ++; + } +} + +static void +ghid_attributes_revert () +{ + int i; + + ghid_attributes_need_rows (attributes_list->Number); + + /* Unmanage any previously used rows we don't need. */ + while (attr_num_rows > attributes_list->Number) + { + attr_num_rows --; + gtk_widget_hide (attr_row[attr_num_rows].del); + gtk_widget_hide (attr_row[attr_num_rows].w_name); + gtk_widget_hide (attr_row[attr_num_rows].w_value); + } + + /* Fill in values */ + for (i=0; iNumber; i++) + { + /* create row [i] */ + gtk_entry_set_text (GTK_ENTRY (attr_row[i].w_name), attributes_list->List[i].name); + gtk_entry_set_text (GTK_ENTRY (attr_row[i].w_value), attributes_list->List[i].value); +#if 0 +#endif + } + ghid_attr_set_table_size (); +} + +static void +attributes_delete_callback (GtkWidget *w, void *v) +{ + int i, n; + + n = GPOINTER_TO_INT (v); + + for (i=n; iNumber, 3, 0); + + content_area = gtk_dialog_get_content_area (GTK_DIALOG (attributes_dialog)); + gtk_box_pack_start (GTK_BOX (content_area), attr_table, FALSE, FALSE, 0); + + gtk_widget_show (attr_table); + + ghid_attributes_revert (); + + while (1) + { + response = gtk_dialog_run (GTK_DIALOG (attributes_dialog)); + + if (response == GTK_RESPONSE_CANCEL) + break; + + if (response == GTK_RESPONSE_OK) + { + int i; + /* Copy the values back */ + for (i=0; iNumber; i++) + { + if (attributes_list->List[i].name) + free (attributes_list->List[i].name); + if (attributes_list->List[i].value) + free (attributes_list->List[i].value); + } + if (attributes_list->Max < attr_num_rows) + { + int sz = attr_num_rows * sizeof (AttributeType); + if (attributes_list->List == NULL) + attributes_list->List = (AttributeType *) malloc (sz); + else + attributes_list->List = (AttributeType *) realloc (attributes_list->List, sz); + attributes_list->Max = attr_num_rows; + } + for (i=0; iList[i].name = strdup (gtk_entry_get_text (GTK_ENTRY (attr_row[i].w_name))); + attributes_list->List[i].value = strdup (gtk_entry_get_text (GTK_ENTRY (attr_row[i].w_value))); + attributes_list->Number = attr_num_rows; + } + + break; + } + + if (response == GA_RESPONSE_REVERT) + { + /* Revert */ + ghid_attributes_revert (); + } + + if (response == GA_RESPONSE_NEW) + { + ghid_attributes_need_rows (attr_num_rows + 1); /* also bumps attr_num_rows */ + + gtk_entry_set_text (GTK_ENTRY (attr_row[attr_num_rows-1].w_name), ""); + gtk_entry_set_text (GTK_ENTRY (attr_row[attr_num_rows-1].w_value), ""); + + ghid_attr_set_table_size (); + } + } + + gtk_widget_destroy (attributes_dialog); + free (attr_row); + attr_row = NULL; +} + +/* ---------------------------------------------------------------------- */ + +HID_DRC_GUI ghid_drc_gui = { + 1, /* log_drc_overview */ + 0, /* log_drc_details */ + ghid_drc_window_reset_message, + ghid_drc_window_append_violation, + ghid_drc_window_throw_dialog, +}; + +extern HID_Attribute *ghid_get_export_options (int *); + + +/* ------------------------------------------------------------ + * + * Actions specific to the GTK HID follow from here + * + */ + + +/* ------------------------------------------------------------ */ +static const char about_syntax[] = +"About()"; + +static const char about_help[] = +N_("Tell the user about this version of PCB."); + +/* %start-doc actions About + +This just pops up a dialog telling the user which version of +@code{pcb} they're running. + +%end-doc */ + + +static int +About (int argc, char **argv, Coord x, Coord y) +{ + ghid_dialog_about (); + return 0; +} + +/* ------------------------------------------------------------ */ +static const char getxy_syntax[] = +"GetXY()"; + +static const char getxy_help[] = +N_("Get a coordinate."); + +/* %start-doc actions GetXY + +Prompts the user for a coordinate, if one is not already selected. + +%end-doc */ + +static int +GetXY (int argc, char **argv, Coord x, Coord y) +{ + return 0; +} + +/* ---------------------------------------------------------------------- */ + +static int PointCursor (int argc, char **argv, Coord x, Coord y) +{ + if (!ghidgui) + return 0; + + if (argc > 0) + ghid_point_cursor (); + else + ghid_mode_cursor (Settings.Mode); + return 0; +} + +/* ---------------------------------------------------------------------- */ + +static int +RouteStylesChanged (int argc, char **argv, Coord x, Coord y) +{ + if (!ghidgui || !ghidgui->route_style_selector) + return 0; + + ghid_route_style_selector_sync + (GHID_ROUTE_STYLE_SELECTOR (ghidgui->route_style_selector), + Settings.LineThickness, Settings.ViaDrillingHole, + Settings.ViaThickness, Settings.Keepaway); + + return 0; +} + +/* ---------------------------------------------------------------------- */ + +int +PCBChanged (int argc, char **argv, Coord x, Coord y) +{ + if (!ghidgui) + return 0; + + ghid_window_set_name_label (PCB->Name); + + if (!gport->pixmap) + return 0; + + if (ghidgui->route_style_selector) + { + ghid_route_style_selector_empty + (GHID_ROUTE_STYLE_SELECTOR (ghidgui->route_style_selector)); + make_route_style_buttons + (GHID_ROUTE_STYLE_SELECTOR (ghidgui->route_style_selector)); + } + RouteStylesChanged (0, NULL, 0, 0); + + ghid_port_ranges_scale (); + ghid_zoom_view_fit (); + ghid_sync_with_new_layout (); + return 0; +} + +/* ---------------------------------------------------------------------- */ + +static int +LayerGroupsChanged (int argc, char **argv, Coord x, Coord y) +{ + printf (_("LayerGroupsChanged -- not implemented\n")); + return 0; +} + +/* ---------------------------------------------------------------------- */ + +static int +LibraryChanged (int argc, char **argv, Coord x, Coord y) +{ + /* No need to show the library window every time it changes... + * ghid_library_window_show (&ghid_port, FALSE); + */ + return 0; +} + +/* ---------------------------------------------------------------------- */ + +static int +Command (int argc, char **argv, Coord x, Coord y) +{ + ghid_handle_user_command (TRUE); + return 0; +} + +/* ---------------------------------------------------------------------- */ + +static int +Load (int argc, char **argv, Coord x, Coord y) +{ + char *function; + char *name = NULL; + + static gchar *current_element_dir = NULL; + static gchar *current_layout_dir = NULL; + static gchar *current_netlist_dir = NULL; + + /* we've been given the file name */ + if (argc > 1) + return hid_actionv ("LoadFrom", argc, argv); + + function = argc ? argv[0] : (char *)"Layout"; + + if (strcasecmp (function, "Netlist") == 0) + { + name = ghid_dialog_file_select_open (_("Load netlist file"), + ¤t_netlist_dir, + Settings.FilePath); + } + else if (strcasecmp (function, "ElementToBuffer") == 0) + { + name = ghid_dialog_file_select_open (_("Load element to buffer"), + ¤t_element_dir, + Settings.LibraryTree); + } + else if (strcasecmp (function, "LayoutToBuffer") == 0) + { + name = ghid_dialog_file_select_open (_("Load layout file to buffer"), + ¤t_layout_dir, + Settings.FilePath); + } + else if (strcasecmp (function, "Layout") == 0) + { + name = ghid_dialog_file_select_open (_("Load layout file"), + ¤t_layout_dir, + Settings.FilePath); + } + + if (name) + { + if (Settings.verbose) + fprintf (stderr, "%s: Calling LoadFrom(%s, %s)\n", __FUNCTION__, + function, name); + hid_actionl ("LoadFrom", function, name, NULL); + g_free (name); + } + + return 0; +} + + +/* ---------------------------------------------------------------------- */ +static const char save_syntax[] = +"Save()\n" +"Save(Layout|LayoutAs)\n" +"Save(AllConnections|AllUnusedPins|ElementConnections)\n" +"Save(PasteBuffer)"; + +static const char save_help[] = +N_("Save layout and/or element data to a user-selected file."); + +/* %start-doc actions Save + +This action is a GUI front-end to the core's @code{SaveTo} action +(@pxref{SaveTo Action}). If you happen to pass a filename, like +@code{SaveTo}, then @code{SaveTo} is called directly. Else, the +user is prompted for a filename to save, and then @code{SaveTo} is +called with that filename. + +%end-doc */ + +static int +Save (int argc, char **argv, Coord x, Coord y) +{ + char *function; + char *name; + char *prompt; + + static gchar *current_dir = NULL; + + if (argc > 1) + return hid_actionv ("SaveTo", argc, argv); + + function = argc ? argv[0] : (char *)"Layout"; + + if (strcasecmp (function, "Layout") == 0) + if (PCB->Filename) + return hid_actionl ("SaveTo", "Layout", PCB->Filename, NULL); + + if (strcasecmp (function, "PasteBuffer") == 0) + prompt = _("Save element as"); + else + prompt = _("Save layout as"); + + name = ghid_dialog_file_select_save (prompt, + ¤t_dir, + PCB->Filename, Settings.FilePath); + + if (name) + { + if (Settings.verbose) + fprintf (stderr, "%s: Calling SaveTo(%s, %s)\n", + __FUNCTION__, function, name); + + if (strcasecmp (function, "PasteBuffer") == 0) + hid_actionl ("PasteBuffer", "Save", name, NULL); + else + { + /* + * if we got this far and the function is Layout, then + * we really needed it to be a LayoutAs. Otherwise + * ActionSaveTo() will ignore the new file name we + * just obtained. + */ + if (strcasecmp (function, "Layout") == 0) + hid_actionl ("SaveTo", "LayoutAs", name, NULL); + else + hid_actionl ("SaveTo", function, name, NULL); + } + g_free (name); + } + else + { + return 1; + } + + return 0; +} + +/* ---------------------------------------------------------------------- */ +static const char swapsides_syntax[] = +"SwapSides(|v|h|r)"; + +static const char swapsides_help[] = +N_("Swaps the side of the board you're looking at."); + +/* %start-doc actions SwapSides + +This action changes the way you view the board. + +@table @code + +@item v +Flips the board over vertically (up/down). + +@item h +Flips the board over horizontally (left/right), like flipping pages in +a book. + +@item r +Rotates the board 180 degrees without changing sides. + +@end table + +If no argument is given, the board isn't moved but the opposite side +is shown. + +Normally, this action changes which pads and silk layer are drawn as +true silk, and which are drawn as the "invisible" layer. It also +determines which solder mask you see. + +As a special case, if the layer group for the side you're looking at +is visible and currently active, and the layer group for the opposite +is not visible (i.e. disabled), then this action will also swap which +layer group is visible and active, effectively swapping the ``working +side'' of the board. + +%end-doc */ + + +static int +SwapSides (int argc, char **argv, Coord x, Coord y) +{ + int active_group = GetLayerGroupNumberByNumber (LayerStack[0]); + int comp_group = GetLayerGroupNumberByNumber (component_silk_layer); + int solder_group = GetLayerGroupNumberByNumber (solder_silk_layer); + bool comp_on = LAYER_PTR (PCB->LayerGroups.Entries[comp_group][0])->On; + bool solder_on = LAYER_PTR (PCB->LayerGroups.Entries[solder_group][0])->On; + + if (argc > 0) + { + switch (argv[0][0]) { + case 'h': + case 'H': + ghid_flip_view (gport->pcb_x, gport->pcb_y, true, false); + break; + case 'v': + case 'V': + ghid_flip_view (gport->pcb_x, gport->pcb_y, false, true); + break; + case 'r': + case 'R': + ghid_flip_view (gport->pcb_x, gport->pcb_y, true, true); + Settings.ShowSolderSide = !Settings.ShowSolderSide; /* Swapped back below */ + break; + default: + return 1; + } + } + + Settings.ShowSolderSide = !Settings.ShowSolderSide; + + if ((active_group == comp_group && comp_on && !solder_on) || + (active_group == solder_group && solder_on && !comp_on)) + { + bool new_solder_vis = Settings.ShowSolderSide; + + ChangeGroupVisibility (PCB->LayerGroups.Entries[comp_group][0], + !new_solder_vis, !new_solder_vis); + ChangeGroupVisibility (PCB->LayerGroups.Entries[solder_group][0], + new_solder_vis, new_solder_vis); + } + + return 0; +} + +/* ------------------------------------------------------------ */ + +static const char print_syntax[] = +"Print()"; + +static const char print_help[] = +N_("Print the layout."); + +/* %start-doc actions Print + +This will find the default printing HID, prompt the user for its +options, and print the layout. + +%end-doc */ + +static int +Print (int argc, char **argv, Coord x, Coord y) +{ + HID **hids; + int i; + HID *printer = NULL; + + hids = hid_enumerate (); + for (i = 0; hids[i]; i++) + { + if (hids[i]->printer) + printer = hids[i]; + } + + if (printer == NULL) + { + gui->log (_("Can't find a suitable printer HID")); + return -1; + } + + /* check if layout is empty */ + if (!IsDataEmpty (PCB->Data)) + { + ghid_dialog_print (printer); + } + else + gui->log (_("Can't print empty layout")); + + return 0; +} + + +/* ------------------------------------------------------------ */ + +static HID_Attribute +printer_calibrate_attrs[] = { + {N_("Enter Values here:"), "", + HID_Label, 0, 0, {0, 0, 0}, 0, 0}, + {N_("x-calibration"), N_("X scale for calibrating your printer"), + HID_Real, 0.5, 25, {0, 0, 1.00}, 0, 0}, + {N_("y-calibration"), N_("Y scale for calibrating your printer"), + HID_Real, 0.5, 25, {0, 0, 1.00}, 0, 0} +}; +static HID_Attr_Val printer_calibrate_values[3]; + +static const char printcalibrate_syntax[] = +"PrintCalibrate()"; + +static const char printcalibrate_help[] = +N_("Calibrate the printer."); + +/* %start-doc actions PrintCalibrate + +This will print a calibration page, which you would measure and type +the measurements in, so that future printouts will be more precise. + +%end-doc */ + +static int +PrintCalibrate (int argc, char **argv, Coord x, Coord y) +{ + HID *printer = hid_find_printer (); + printer->calibrate (0.0, 0.0); + + if (gui->attribute_dialog (printer_calibrate_attrs, 3, + printer_calibrate_values, + _("Printer Calibration Values"), + _("Enter calibration values for your printer"))) + return 1; + printer->calibrate (printer_calibrate_values[1].real_value, + printer_calibrate_values[2].real_value); + return 0; +} + +/* ------------------------------------------------------------ */ + +static int +Export (int argc, char **argv, Coord x, Coord y) +{ + + /* check if layout is empty */ + if (!IsDataEmpty (PCB->Data)) + { + ghid_dialog_export (); + } + else + gui->log (_("Can't export empty layout")); + + return 0; +} + +/* ------------------------------------------------------------ */ + +static int +Benchmark (int argc, char **argv, Coord x, Coord y) +{ + int i = 0; + time_t start, end; + GdkDisplay *display; + + display = gdk_drawable_get_display (gport->drawable); + + gdk_display_sync (display); + time (&start); + do + { + ghid_invalidate_all (); + gdk_window_process_updates (gtk_widget_get_window (gport->drawing_area), + FALSE); + time (&end); + i++; + } + while (end - start < 10); + + printf (_("%g redraws per second\n"), i / 10.0); + + return 0; +} + +/* ------------------------------------------------------------ */ + +static const char center_syntax[] = +"Center()\n"; + +static const char center_help[] = +N_("Moves the pointer to the center of the window."); + +/* %start-doc actions Center + +Move the pointer to the center of the window, but only if it's +currently within the window already. + +%end-doc */ + +static int +Center(int argc, char **argv, Coord pcb_x, Coord pcb_y) +{ + GdkDisplay *display; + GdkScreen *screen; + int offset_x, offset_y; + int widget_x, widget_y; + int pointer_x, pointer_y; + + if (argc != 0) + AFAIL (center); + + /* Aim to put the given x, y PCB coordinates in the center of the widget */ + widget_x = gport->width / 2; + widget_y = gport->height / 2; + + ghid_pan_view_abs (pcb_x, pcb_y, widget_x, widget_y); + + /* Now move the mouse pointer to the place where the board location + * actually ended up. + * + * XXX: Should only do this if we confirm we are inside our window? + */ + + ghid_pcb_to_event_coords (pcb_x, pcb_y, &widget_x, &widget_y); + gdk_window_get_origin (gtk_widget_get_window (gport->drawing_area), + &offset_x, &offset_y); + + pointer_x = offset_x + widget_x; + pointer_y = offset_y + widget_y; + + display = gdk_display_get_default (); + screen = gdk_display_get_default_screen (display); + gdk_display_warp_pointer (display, screen, pointer_x, pointer_y); + + return 0; +} + +/* ------------------------------------------------------------ */ +static const char cursor_syntax[] = +"Cursor(Type,DeltaUp,DeltaRight,Units)"; + +static const char cursor_help[] = +N_("Move the cursor."); + +/* %start-doc actions Cursor + +This action moves the mouse cursor. Unlike other actions which take +coordinates, this action's coordinates are always relative to the +user's view of the board. Thus, a positive @var{DeltaUp} may move the +cursor towards the board origin if the board is inverted. + +Type is one of @samp{Pan} or @samp{Warp}. @samp{Pan} causes the +viewport to move such that the crosshair is under the mouse cursor. +@samp{Warp} causes the mouse cursor to move to be above the crosshair. + +@var{Units} can be one of the following: + +@table @samp + +@item mil +@itemx mm +The cursor is moved by that amount, in board units. + +@item grid +The cursor is moved by that many grid points. + +@item view +The values are percentages of the viewport's view. Thus, a pan of +@samp{100} would scroll the viewport by exactly the width of the +current view. + +@item board +The values are percentages of the board size. Thus, a move of +@samp{50,50} moves you halfway across the board. + +@end table + +%end-doc */ + +static int +CursorAction(int argc, char **argv, Coord x, Coord y) +{ + UnitList extra_units_x = { + { "grid", PCB->Grid, 0 }, + { "view", gport->view.width, UNIT_PERCENT }, + { "board", PCB->MaxWidth, UNIT_PERCENT }, + { "", 0, 0 } + }; + UnitList extra_units_y = { + { "grid", PCB->Grid, 0 }, + { "view", gport->view.height, UNIT_PERCENT }, + { "board", PCB->MaxHeight, UNIT_PERCENT }, + { "", 0, 0 } + }; + int pan_warp = HID_SC_DO_NOTHING; + double dx, dy; + + if (argc != 4) + AFAIL (cursor); + + if (strcasecmp (argv[0], "pan") == 0) + pan_warp = HID_SC_PAN_VIEWPORT; + else if (strcasecmp (argv[0], "warp") == 0) + pan_warp = HID_SC_WARP_POINTER; + else + AFAIL (cursor); + + dx = GetValueEx (argv[1], argv[3], NULL, extra_units_x, ""); + if (gport->view.flip_x) + dx = -dx; + dy = GetValueEx (argv[2], argv[3], NULL, extra_units_y, ""); + if (!gport->view.flip_y) + dy = -dy; + + EventMoveCrosshair (Crosshair.X + dx, Crosshair.Y + dy); + gui->set_crosshair (Crosshair.X, Crosshair.Y, pan_warp); + + return 0; +} +/* ------------------------------------------------------------ */ + +static const char dowindows_syntax[] = +"DoWindows(1|2|3|4|5|6)\n" +"DoWindows(Layout|Library|Log|Netlist|Preferences|DRC)"; + +static const char dowindows_help[] = +N_("Open various GUI windows."); + +/* %start-doc actions DoWindows + +@table @code + +@item 1 +@itemx Layout +Open the layout window. Since the layout window is always shown +anyway, this has no effect. + +@item 2 +@itemx Library +Open the library window. + +@item 3 +@itemx Log +Open the log window. + +@item 4 +@itemx Netlist +Open the netlist window. + +@item 5 +@itemx Preferences +Open the preferences window. + +@item 6 +@itemx DRC +Open the DRC violations window. + +@end table + +%end-doc */ + +static int +DoWindows (int argc, char **argv, Coord x, Coord y) +{ + char *a = argc == 1 ? argv[0] : (char *)""; + + if (strcmp (a, "1") == 0 || strcasecmp (a, "Layout") == 0) + { + } + else if (strcmp (a, "2") == 0 || strcasecmp (a, "Library") == 0) + { + ghid_library_window_show (gport, TRUE); + } + else if (strcmp (a, "3") == 0 || strcasecmp (a, "Log") == 0) + { + ghid_log_window_show (TRUE); + } + else if (strcmp (a, "4") == 0 || strcasecmp (a, "Netlist") == 0) + { + ghid_netlist_window_show (gport, TRUE); + } + else if (strcmp (a, "5") == 0 || strcasecmp (a, "Preferences") == 0) + { + ghid_config_window_show (); + } + else if (strcmp (a, "6") == 0 || strcasecmp (a, "DRC") == 0) + { + ghid_drc_window_show (TRUE); + } + else + { + AFAIL (dowindows); + } + + return 0; +} + +/* ------------------------------------------------------------ */ +static const char setunits_syntax[] = +"SetUnits(mm|mil)"; + +static const char setunits_help[] = +N_("Set the default measurement units."); + +/* %start-doc actions SetUnits + +@table @code + +@item mil +Sets the display units to mils (1/1000 inch). + +@item mm +Sets the display units to millimeters. + +@end table + +%end-doc */ + +static int +SetUnits (int argc, char **argv, Coord x, Coord y) +{ + const Unit *new_unit; + if (argc == 0) + return 0; + + new_unit = get_unit_struct (argv[0]); + if (new_unit != NULL && new_unit->allow != NO_PRINT) + { + Settings.grid_unit = new_unit; + Settings.increments = get_increments_struct (Settings.grid_unit->suffix); + AttributePut (PCB, "PCB::grid::unit", argv[0]); + } + + ghid_config_handle_units_changed (); + + ghid_set_status_line_label (); + + /* FIXME ? + * lesstif_sizes_reset (); + * lesstif_styles_update_values (); + */ + return 0; +} + +/* ------------------------------------------------------------ */ +static const char scroll_syntax[] = +"Scroll(up|down|left|right, [div])"; + +static const char scroll_help[] = +N_("Scroll the viewport."); + +/* % start-doc actions Scroll + +@item up|down|left|right +Specifies the direction to scroll + +@item div +Optional. Specifies how much to scroll by. The viewport is scrolled +by 1/div of what is visible, so div = 1 scrolls a whole page. If not +default is given, div=40. + +%end-doc */ + +static int +ScrollAction (int argc, char **argv, Coord x, Coord y) +{ + gdouble dx = 0.0, dy = 0.0; + int div = 40; + + if (!ghidgui) + return 0; + + if (argc != 1 && argc != 2) + AFAIL (scroll); + + if (argc == 2) + div = atoi(argv[1]); + + if (strcasecmp (argv[0], "up") == 0) + dy = -gport->view.height / div; + else if (strcasecmp (argv[0], "down") == 0) + dy = gport->view.height / div; + else if (strcasecmp (argv[0], "right") == 0) + dx = gport->view.width / div; + else if (strcasecmp (argv[0], "left") == 0) + dx = -gport->view.width / div; + else + AFAIL (scroll); + + ghid_pan_view_rel (dx, dy); + + return 0; +} + +/* ------------------------------------------------------------ */ +static const char pan_syntax[] = +"Pan([thumb], Mode)"; + +static const char pan_help[] = +N_("Start or stop panning (Mode = 1 to start, 0 to stop)\n" +"Optional thumb argument is ignored for now in gtk hid.\n"); + +/* %start-doc actions Pan + +Start or stop panning. To start call with Mode = 1, to stop call with +Mode = 0. + +%end-doc */ + +static int +PanAction (int argc, char **argv, Coord x, Coord y) +{ + int mode; + + if (!ghidgui) + return 0; + + if (argc != 1 && argc != 2) + AFAIL (pan); + + if (argc == 1) + mode = atoi(argv[0]); + else + { + mode = atoi(argv[1]); + Message (_("The gtk gui currently ignores the optional first argument " + "to the Pan action.\nFeel free to provide patches.\n")); + } + + gport->panning = mode; + + return 0; +} + +/* ------------------------------------------------------------ */ +static const char popup_syntax[] = +"Popup(MenuName, [Button])"; + +static const char popup_help[] = +N_("Bring up the popup menu specified by @code{MenuName}.\n" +"If called by a mouse event then the mouse button number\n" +"must be specified as the optional second argument."); + +/* %start-doc actions Popup + +This just pops up the specified menu. The menu must have been defined +as a named subresource of the Popups resource in the menu resource +file. + +%end-doc */ + + +static int +Popup (int argc, char **argv, Coord x, Coord y) +{ + GtkMenu *menu; + + if (argc != 1 && argc != 2) + AFAIL (popup); + + menu = ghid_main_menu_get_popup (GHID_MAIN_MENU (ghidgui->menu_bar), argv[0]); + if (! GTK_IS_MENU (menu)) + { + Message (_("The specified popup menu \"%s\" has not been defined.\n"), argv[0]); + return 1; + } + else + { + ghidgui->in_popup = TRUE; + gtk_widget_grab_focus (ghid_port.drawing_area); + gtk_menu_popup (menu, NULL, NULL, NULL, NULL, 0, + gtk_get_current_event_time()); + } + return 0; +} +/* ------------------------------------------------------------ */ +static const char importgui_syntax[] = +"ImportGUI()"; + +static const char importgui_help[] = +N_("Asks user which schematics to import into PCB.\n"); + +/* %start-doc actions ImportGUI + +Asks user which schematics to import into PCB. + +%end-doc */ + + +static int +ImportGUI (int argc, char **argv, Coord x, Coord y) +{ + char *name = NULL; + static gchar *current_layout_dir = NULL; + static int I_am_recursing = 0; + int rv; + + if (I_am_recursing) + return 1; + + + name = ghid_dialog_file_select_open (_("Load schematics"), + ¤t_layout_dir, + Settings.FilePath); + +#ifdef DEBUG + printf("File selected = %s\n", name); +#endif + + AttributePut (PCB, "import::src0", name); + free (name); + + I_am_recursing = 1; + rv = hid_action ("Import"); + I_am_recursing = 0; + + return rv; +} + +/* ------------------------------------------------------------ */ +static int +Busy (int argc, char **argv, Coord x, Coord y) +{ + ghid_watch_cursor (); + return 0; +} + +HID_Action ghid_main_action_list[] = { + {"About", 0, About, about_help, about_syntax}, + {"Benchmark", 0, Benchmark}, + {"Busy", 0, Busy}, + {"Center", N_("Click on a location to center"), Center, center_help, center_syntax}, + {"Command", 0, Command}, + {"Cursor", 0, CursorAction, cursor_help, cursor_syntax}, + {"DoWindows", 0, DoWindows, dowindows_help, dowindows_syntax}, + {"Export", 0, Export}, + {"GetXY", "", GetXY, getxy_help, getxy_syntax}, + {"ImportGUI", 0, ImportGUI, importgui_help, importgui_syntax}, + {"LayerGroupsChanged", 0, LayerGroupsChanged}, + {"LibraryChanged", 0, LibraryChanged}, + {"Load", 0, Load}, + {"Pan", 0, PanAction, pan_help, pan_syntax}, + {"PCBChanged", 0, PCBChanged}, + {"PointCursor", 0, PointCursor}, + {"Popup", 0, Popup, popup_help, popup_syntax}, + {"Print", 0, Print, + print_help, print_syntax}, + {"PrintCalibrate", 0, PrintCalibrate, + printcalibrate_help, printcalibrate_syntax}, + {"RouteStylesChanged", 0, RouteStylesChanged}, + {"Save", 0, Save, save_help, save_syntax}, + {"Scroll", N_("Click on a place to scroll"), ScrollAction, scroll_help, scroll_syntax}, + {"SetUnits", 0, SetUnits, setunits_help, setunits_syntax}, + {"SwapSides", 0, SwapSides, swapsides_help, swapsides_syntax}, + {"Zoom", N_("Click on zoom focus"), Zoom, zoom_help, zoom_syntax} +}; + +REGISTER_ACTIONS (ghid_main_action_list) + + +static int +flag_flipx (int x) +{ + return gport->view.flip_x; +} + +static int +flag_flipy (int x) +{ + return gport->view.flip_y; +} + +HID_Flag ghid_main_flag_list[] = { + {"flip_x", flag_flipx, 0}, + {"flip_y", flag_flipy, 0} +}; + +REGISTER_FLAGS (ghid_main_flag_list) + +#include "dolists.h" + +/* + * We will need these for finding the windows installation + * directory. Without that we can't find our fonts and + * footprint libraries. + */ +#ifdef WIN32 +#include +#include +#endif + +HID ghid_hid; + +void +hid_gtk_init () +{ +#ifdef WIN32 + char * tmps; + char * share_dir; + char *loader_cache; + FILE *loader_file; +#endif + +#ifdef WIN32 + tmps = g_win32_get_package_installation_directory (PACKAGE "-" VERSION, NULL); +#define REST_OF_PATH G_DIR_SEPARATOR_S "share" G_DIR_SEPARATOR_S PACKAGE +#define REST_OF_CACHE G_DIR_SEPARATOR_S "loaders.cache" + share_dir = (char *) malloc(strlen(tmps) + + strlen(REST_OF_PATH) + + 1); + sprintf (share_dir, "%s%s", tmps, REST_OF_PATH); + + /* Point to our gdk-pixbuf loader cache. */ + loader_cache = (char *) malloc (strlen (bindir) + + strlen (REST_OF_CACHE) + + 1); + sprintf (loader_cache, "%s%s", bindir, REST_OF_CACHE); + loader_file = fopen (loader_cache, "r"); + if (loader_file) + { + fclose (loader_file); + g_setenv ("GDK_PIXBUF_MODULE_FILE", loader_cache, TRUE); + } + + free (tmps); +#undef REST_OF_PATH + printf ("\"Share\" installation path is \"%s\"\n", share_dir); +#endif + + memset (&ghid_hid, 0, sizeof (HID)); + + common_nogui_init (&ghid_hid); + common_draw_helpers_init (&ghid_hid); + + ghid_hid.struct_size = sizeof (HID); + ghid_hid.name = "gtk"; + ghid_hid.description = "Gtk - The Gimp Toolkit"; + ghid_hid.gui = 1; + ghid_hid.poly_after = 1; + + ghid_hid.get_export_options = ghid_get_export_options; + ghid_hid.do_export = ghid_do_export; + ghid_hid.parse_arguments = ghid_parse_arguments; + ghid_hid.invalidate_lr = ghid_invalidate_lr; + ghid_hid.invalidate_all = ghid_invalidate_all; + ghid_hid.notify_crosshair_change = ghid_notify_crosshair_change; + ghid_hid.notify_mark_change = ghid_notify_mark_change; + ghid_hid.set_layer = ghid_set_layer; + ghid_hid.make_gc = ghid_make_gc; + ghid_hid.destroy_gc = ghid_destroy_gc; + ghid_hid.use_mask = ghid_use_mask; + ghid_hid.set_color = ghid_set_color; + ghid_hid.set_line_cap = ghid_set_line_cap; + ghid_hid.set_line_width = ghid_set_line_width; + ghid_hid.set_draw_xor = ghid_set_draw_xor; + ghid_hid.draw_line = ghid_draw_line; + ghid_hid.draw_arc = ghid_draw_arc; + ghid_hid.draw_rect = ghid_draw_rect; + ghid_hid.fill_circle = ghid_fill_circle; + ghid_hid.fill_polygon = ghid_fill_polygon; + ghid_hid.fill_rect = ghid_fill_rect; + + ghid_hid.calibrate = ghid_calibrate; + ghid_hid.shift_is_pressed = ghid_shift_is_pressed; + ghid_hid.control_is_pressed = ghid_control_is_pressed; + ghid_hid.mod1_is_pressed = ghid_mod1_is_pressed, + ghid_hid.get_coords = ghid_get_coords; + ghid_hid.set_crosshair = ghid_set_crosshair; + ghid_hid.add_timer = ghid_add_timer; + ghid_hid.stop_timer = ghid_stop_timer; + ghid_hid.watch_file = ghid_watch_file; + ghid_hid.unwatch_file = ghid_unwatch_file; + ghid_hid.add_block_hook = ghid_add_block_hook; + ghid_hid.stop_block_hook = ghid_stop_block_hook; + + ghid_hid.log = ghid_log; + ghid_hid.logv = ghid_logv; + ghid_hid.confirm_dialog = ghid_confirm_dialog; + ghid_hid.close_confirm_dialog = ghid_close_confirm_dialog; + ghid_hid.report_dialog = ghid_report_dialog; + ghid_hid.prompt_for = ghid_prompt_for; + ghid_hid.fileselect = ghid_fileselect; + ghid_hid.attribute_dialog = ghid_attribute_dialog; + ghid_hid.show_item = ghid_show_item; + ghid_hid.beep = ghid_beep; + ghid_hid.progress = ghid_progress; + ghid_hid.drc_gui = &ghid_drc_gui, + ghid_hid.edit_attributes = ghid_attributes; + + ghid_hid.request_debug_draw = ghid_request_debug_draw; + ghid_hid.flush_debug_draw = ghid_flush_debug_draw; + ghid_hid.finish_debug_draw = ghid_finish_debug_draw; + + ghid_hid.notify_save_pcb = ghid_notify_save_pcb; + ghid_hid.notify_filename_changed = ghid_notify_filename_changed; + + hid_register_hid (&ghid_hid); +#include "gtk_lists.h" +} Index: trunk/.pc/disable_hid_png3_test.diff/tests/tests.list =================================================================== --- trunk/.pc/disable_hid_png3_test.diff/tests/tests.list (nonexistent) +++ trunk/.pc/disable_hid_png3_test.diff/tests/tests.list (revision 4) @@ -0,0 +1,166 @@ +# Copyright (c) 2003, 2004, 2005, 2006, 2007, 2009, 2010 Dan McMahill +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of version 2 of the GNU General Public License as +# published by the Free Software Foundation +# +# 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 USA +# All rights reserved. +# +# This code was derived from code written by Dan McMahill as part of the +# latex-mk testsuite. The original code was covered by a BSD license +# but the copyright holder is releasing the version for pcb under the GPL. +# +# +# Format: +# +# test_name | layout file(s) | [export hid name] | [optional arguments to pcb] | [mismatch] +# | output file(s) +# +# test_name - a single string with no spaces, tabs, *, +, ? (i.e. any "special" +# characters) that identifies the test. +# +# layout file(s) - a list of layout files. Files listed are relative to +# the $(top_srcdir)/tests/inputs directory. +# +# [export hid name] - the name of the export HID to use. This is used both for +# running pcb as well as determining how we process the output +# +# [optional arguments to pcb] - a list of additional arguments to be passed to pcb. +# This is where one would specify additional options which are specific to a particular +# export HID. +# +# [mismatch] If specified as "mismatch" (no quotes), then the result +# should *not* match the reference. This can be thought of as a test +# on the testsuite to make sure we can properly detect when a change has +# occurred. +# +# output file(s) - a list of output files and their associated types. For +# example: +# bom:bom_general.bom xy:test.txt +# specifies that "bom_general.bom" is created and it is a bill of materials file +# and that "test.txt" is created and it is a centroid (X-Y) file. +# +# File types grouped by which HID produces them are: +# +# BOM +# +# bom -- PCB bill of materials file +# xy -- PCB centroid file +# +# GCODE +# +# gcode -- G-Code file. Note that these typically have .cnc as the +# extension but we're already using the 'cnc' type for +# Excellon drill files. +# +# GERBER +# +# cnc -- Excellon drill file +# gbx -- RS274-X (Gerber) file +# +# PNG +# +# gif -- GIF file +# jpg -- JPEG file +# png -- Portable network graphics (PNG) file +# +###################################################################### +# --------------------------------------------- +# BOM export HID +# --------------------------------------------- +###################################################################### +# +# options: +# --bomfile BOM output file +# --xyfile XY output file +# --xy-in-mm XY dimensions in mm instead of mils +# +# +# Produces a bill of materials (BOM) file and a centroid (XY) file +# +hid_bom1 | bom_general.pcb | bom | | | bom:bom_general.bom xy:bom_general.xy +hid_bom2 | bom_general.pcb | bom | --bomfile test.bom | | bom:test.bom xy:bom_general.xy +hid_bom3 | bom_general.pcb | bom | --xyfile test.xy | | bom:bom_general.bom xy:test.xy +hid_bom4 | bom_general.pcb | bom | --xy-in-mm | | bom:bom_general.bom xy:bom_general.xy +# +###################################################################### +# --------------------------------------------- +# Gcode export HID +# --------------------------------------------- +###################################################################### +# +# options: +# --basename File name prefix +# --dpi Resolution of intermediate image (pixels/inch). +# --mill depth Milling depth. +# --safe Z Safe Z for traverse move. +# --tool radius Milling tool radius compensation. +# --drill depth Drilling depth. +# --measurement unit Measurement unit +# +hid_gcode1 | gcode_oneline.pcb | gcode | | | gcode:gcode_oneline.gcode.top.cnc gcode:gcode_oneline.gcode.bottom.cnc gcode:gcode_oneline.gcode.drill.cnc +hid_gcode2 | gcode_oneline.pcb | gcode | --basename out | | gcode:out.top.cnc gcode:out.bottom.cnc gcode:out.drill.cnc +hid_gcode3 | gcode_oneline.pcb | gcode | --dpi 1200 | | gcode:gcode_oneline.gcode.top.cnc gcode:gcode_oneline.gcode.bottom.cnc gcode:gcode_oneline.gcode.drill.cnc +hid_gcode4 | gcode_oneline.pcb | gcode | --mill-depth 5 | | gcode:gcode_oneline.gcode.top.cnc gcode:gcode_oneline.gcode.bottom.cnc gcode:gcode_oneline.gcode.drill.cnc +hid_gcode5 | gcode_oneline.pcb | gcode | --safe-Z 10 | | gcode:gcode_oneline.gcode.top.cnc gcode:gcode_oneline.gcode.bottom.cnc gcode:gcode_oneline.gcode.drill.cnc +hid_gcode6 | gcode_oneline.pcb | gcode | --tool-radius 15 | | gcode:gcode_oneline.gcode.top.cnc gcode:gcode_oneline.gcode.bottom.cnc gcode:gcode_oneline.gcode.drill.cnc +hid_gcode7 | gcode_oneline.pcb | gcode | --drill-depth 70 | | gcode:gcode_oneline.gcode.top.cnc gcode:gcode_oneline.gcode.bottom.cnc gcode:gcode_oneline.gcode.drill.cnc +hid_gcode8 | gcode_oneline.pcb | gcode | --measurement-unit mm | | gcode:gcode_oneline.gcode.top.cnc gcode:gcode_oneline.gcode.bottom.cnc gcode:gcode_oneline.gcode.drill.cnc +hid_gcode9 | gcode_oneline.pcb | gcode | --measurement-unit mil | | gcode:gcode_oneline.gcode.top.cnc gcode:gcode_oneline.gcode.bottom.cnc gcode:gcode_oneline.gcode.drill.cnc +hid_gcode10 | gcode_oneline.pcb | gcode | --measurement-unit um | | gcode:gcode_oneline.gcode.top.cnc gcode:gcode_oneline.gcode.bottom.cnc gcode:gcode_oneline.gcode.drill.cnc +hid_gcode11 | gcode_oneline.pcb | gcode | --measurement-unit inch | | gcode:gcode_oneline.gcode.top.cnc gcode:gcode_oneline.gcode.bottom.cnc gcode:gcode_oneline.gcode.drill.cnc +# +###################################################################### +# --------------------------------------------- +# Gerber export HID +# --------------------------------------------- +###################################################################### +# +# options: +# --gerberfile Basename for output file +# +# Produces RS274-X (a.k.a. gerber) photo plot files and Excellon drill files +# +# we can't include gbx:gerber_oneline.fab.gbr yet because it has a name and a date stamp +hid_gerber1 | gerber_oneline.pcb | gerber | | | gbx:gerber_oneline.bottom.gbr gbx:gerber_oneline.top.gbr cnc:gerber_oneline.plated-drill.cnc +hid_gerber2 | gerber_oneline.pcb | gerber | --gerberfile out | | gbx:out.bottom.gbr gbx:out.top.gbr cnc:out.plated-drill.cnc +hid_gerber3 | gerber_arcs.pcb | gerber | --gerberfile arcs | | gbx:arcs.bottom.gbr gbx:arcs.top.gbr gbx:arcs.group1.gbr gbx:arcs.group4.gbr cnc:arcs.plated-drill.cnc +# + + +###################################################################### +# --------------------------------------------- +# PNG export HID +# --------------------------------------------- +###################################################################### +# +# options: +# --outfile Graphics output file +# --dpi Scale factor (pixels/inch). 0 to scale to fix specified size +# --x-max Maximum width (pixels). 0 to not constrain. +# --y-max Maximum height (pixels). 0 to not constrain. +# --xy-max Maximum width and height (pixels). 0 to not constrain. +# --as-shown Export layers as shown on screen +# --monochrome Convert to monochrome +# --only-visible Limit the bounds of the PNG file to the visible items +# --use-alpha Make the bottomground and any holes transparent +# --format Graphics file format +# --photo-mode Photo-realistic mode +# --photo-flip-x Show reverse side of the board, left-right flip +# --photo-flip-y Show reverse side of the board, up-down flip +# +# Produces GIF/JPEG/PNG (image) files +# +hid_png1 | gerber_oneline.pcb | png | | | png:gerber_oneline.png +hid_png2 | gerber_oneline.pcb | png | --outfile myfile.png | | png:myfile.png +hid_png3 | gerber_oneline.pcb | png | --dpi 300 | | png:gerber_oneline.png +# + Index: trunk/.pc/drop_check_global_included.patch/src/hid/hidint.h =================================================================== --- trunk/.pc/drop_check_global_included.patch/src/hid/hidint.h (nonexistent) +++ trunk/.pc/drop_check_global_included.patch/src/hid/hidint.h (revision 4) @@ -0,0 +1,75 @@ +/* $Id$ */ + +/* HID internal interfaces. These may ONLY be called from the HID + modules, not from the common PCB code. */ + +/* These decode the set_layer index. */ +#define SL_TYPE(x) ((x) < 0 ? (x) & 0x0f0 : 0) +#define SL_SIDE(x) ((x) & 0x00f) +#define SL_MYSIDE(x) ((((x) & SL_BOTTOM_SIDE)!=0) == (SWAP_IDENT != 0)) + +/* Called by the init funcs, used to set up hid_list. */ +extern void hid_register_hid (HID * hid); + +/* NULL terminated list of all static HID structures. Built by + hid_register_hid, used by hid_find_*() and hid_enumerate(). The + order in this list is the same as the order of hid_register_hid + calls. */ +extern HID **hid_list; + +/* Count of entries in the above. */ +extern int hid_num_hids; + +/* Used to cache color lookups. If set is zero, it looks up the name + and if found sets val and returns nonzero. If not found, it + returns zero. If set is nonzero, name/val is added to the + cache. */ +int hid_cache_color (int set, const char *name, hidval * val, void **cache); + +typedef struct HID_AttrNode +{ + struct HID_AttrNode *next; + HID_Attribute *attributes; + int n; +} HID_AttrNode; + +extern HID_AttrNode *hid_attr_nodes; + +HID_Action *hid_find_action (const char *name); + +HID_Flag *hid_find_flag (const char *name); + +/* A HID may use this if it does not need command line arguments in + any special format; for example, the Lesstif HID needs to use the + Xt parser, but the Postscript HID can use this function. */ +void hid_parse_command_line (int *argc, char ***argv); + +/* Use this to temporarily enable all layers, so that they can be + exported even if they're not currently visible. save_array must be + MAX_LAYER+2 big. */ +void hid_save_and_show_layer_ons (int *save_array); +/* Use this to restore them. */ +void hid_restore_layer_ons (int *save_array); + +enum File_Name_Style { + /* Files for copper layers are named top, groupN, bottom. */ + FNS_fixed, + /* Groups with multiple layers are named as above, else the single + layer name is used. */ + FNS_single, + /* The name of the first layer in each group is used. */ + FNS_first, +}; + +/* Returns a filename base that can be used to output the layer. */ +const char *layer_type_to_file_name (int idx, int style); + +#ifdef __GLOBAL_INCLUDED__ + +/* Convenience function that calls the expose callback for the item, + and returns the extents of what was drawn. */ +BoxType *hid_get_extents (void *item); + +#endif + +void derive_default_filename(const char *pcbfile, HID_Attribute *filename_attrib, const char *suffix, char **memory); Index: trunk/.pc/fix_CPPFLAGS.diff/configure =================================================================== --- trunk/.pc/fix_CPPFLAGS.diff/configure (nonexistent) +++ trunk/.pc/fix_CPPFLAGS.diff/configure (revision 4) @@ -0,0 +1,19226 @@ +#! /bin/sh +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.66 for pcb 20110918. +# +# +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software +# Foundation, Inc. +# +# +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +if test "x$CONFIG_SHELL" = x; then + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi +" + as_required="as_fn_return () { (exit \$1); } +as_fn_success () { as_fn_return 0; } +as_fn_failure () { as_fn_return 1; } +as_fn_ret_success () { return 0; } +as_fn_ret_failure () { return 1; } + +exitcode=0 +as_fn_success || { exitcode=1; echo as_fn_success failed.; } +as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } +as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } +as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : + +else + exitcode=1; echo positional parameters were not saved. +fi +test x\$exitcode = x0 || exit 1" + as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO + as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO + eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 +test \$(( 1 + 1 )) = 2 || exit 1" + if (eval "$as_required") 2>/dev/null; then : + as_have_required=yes +else + as_have_required=no +fi + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : + +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + as_found=: + case $as_dir in #( + /*) + for as_base in sh bash ksh sh5; do + # Try only shells that exist, to save several forks. + as_shell=$as_dir/$as_base + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + CONFIG_SHELL=$as_shell as_have_required=yes + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + break 2 +fi +fi + done;; + esac + as_found=false +done +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi; } +IFS=$as_save_IFS + + + if test "x$CONFIG_SHELL" != x; then : + # We cannot yet assume a decent shell, so we have to provide a + # neutralization value for shells without unset; and this also + # works around shells that cannot unset nonexistent variables. + BASH_ENV=/dev/null + ENV=/dev/null + (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} +fi + + if test x$as_have_required = xno; then : + $as_echo "$0: This script requires a shell more modern than all" + $as_echo "$0: the shells that I found on your system." + if test x${ZSH_VERSION+set} = xset ; then + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" + $as_echo "$0: be upgraded to zsh 4.3.4 or later." + else + $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, +$0: including any error possibly output before this +$0: message. Then install a modern shell, or manually run +$0: the script under such a shell if you do have one." + fi + exit 1 +fi +fi +fi +SHELL=${CONFIG_SHELL-/bin/sh} +export SHELL +# Unset more variables known to interfere with behavior of common tools. +CLICOLOR_FORCE= GREP_OPTIONS= +unset CLICOLOR_FORCE GREP_OPTIONS + +## --------------------- ## +## M4sh Shell Functions. ## +## --------------------- ## +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + + + as_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO as_lineno_2a=$LINENO + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { + # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' + fi +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in #( + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +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='pcb' +PACKAGE_TARNAME='pcb' +PACKAGE_VERSION='20110918' +PACKAGE_STRING='pcb 20110918' +PACKAGE_BUGREPORT='' +PACKAGE_URL='' + +ac_unique_file="src/draw.c" +# 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_header_list= +ac_subst_vars='am__EXEEXT_FALSE +am__EXEEXT_TRUE +LTLIBOBJS +LIBOBJS +TOPDIRS +BTNMOD +PCBTREEPATH +PCBTREEDIR +LIBRARYFILENAME +PCBLIBDIR +FONTFILENAME +CC_OR_CXX_FLAGS +CC_OR_CXX +DEBUG_BUILD_FALSE +DEBUG_BUILD_TRUE +PCB +BUILD_PCBLIB_NEWLIB_FALSE +BUILD_PCBLIB_NEWLIB_TRUE +PNG_PREVIEW_FALSE +PNG_PREVIEW_TRUE +GIF_FALSE +GIF_TRUE +PNG_FALSE +PNG_TRUE +GDLIB_CONFIG +GTKGLEXT_LIBS +GTKGLEXT_CFLAGS +GTK_LIBS +GTK_CFLAGS +X_EXTRA_LIBS +X_LIBS +X_PRE_LIBS +X_CFLAGS +GLIB_LIBS +GLIB_CFLAGS +HAVE_TEST_TOOLS_FALSE +HAVE_TEST_TOOLS_TRUE +GERBV +IM_MONTAGE +IM_DISPLAY +IM_CONVERT +IM_COMPOSITE +IM_COMPARE +IM_ANIMATE +MISSING_GSCHEM_FALSE +MISSING_GSCHEM_TRUE +GSCHEM +MISSING_PS2PDF_FALSE +MISSING_PS2PDF_TRUE +PS2PDF +MISSING_TEXI2DVI_FALSE +MISSING_TEXI2DVI_TRUE +MISSING_PDFLATEX_FALSE +MISSING_PDFLATEX_TRUE +PDFLATEX +GNUM4 +WISH +M4 +UPDATE_MIME_DATABASE +ENABLE_UPDATE_MIME_DATABASE_FALSE +ENABLE_UPDATE_MIME_DATABASE_TRUE +UPDATE_DESKTOP_DATABASE +ENABLE_UPDATE_DESKTOP_DATABASE_FALSE +ENABLE_UPDATE_DESKTOP_DATABASE_TRUE +KDEDATADIR +XDGDATADIR +GTK_UPDATE_ICON_CACHE_BIN +SETENV +HIDLIBS +HIDLIST +GLU_LIBS +GLU_CFLAGS +GL_LIBS +GL_CFLAGS +PTHREAD_CFLAGS +PTHREAD_LIBS +PTHREAD_CC +ax_pthread_config +SED +XMKMF +USE_GL_FALSE +USE_GL_TRUE +DBUS_LIBS +DBUS_CFLAGS +WITH_DBUS_FALSE +WITH_DBUS_TRUE +CAIRO_LIBS +CAIRO_CFLAGS +PKG_CONFIG_LIBDIR +PKG_CONFIG_PATH +PKG_CONFIG +WITH_TOPOROUTER_FALSE +WITH_TOPOROUTER_TRUE +KPSEWHICH +PERL +TEXI2DVI +MKINFO +CONVERT +PPMTOWINICON +XPMTOPPM +YACC_PATH +YFLAGS +YACC +LEX_PATH +LEXLIB +LEX_OUTPUT_ROOT +LEX +ALL_LINGUAS +INTLTOOL_PERL +INTLTOOL_POLICY_RULE +INTLTOOL_SERVICE_RULE +INTLTOOL_THEME_RULE +INTLTOOL_SCHEMAS_RULE +INTLTOOL_CAVES_RULE +INTLTOOL_XML_NOMERGE_RULE +INTLTOOL_XML_RULE +INTLTOOL_KBD_RULE +INTLTOOL_XAM_RULE +INTLTOOL_UI_RULE +INTLTOOL_SOUNDLIST_RULE +INTLTOOL_SHEET_RULE +INTLTOOL_SERVER_RULE +INTLTOOL_PONG_RULE +INTLTOOL_OAF_RULE +INTLTOOL_PROP_RULE +INTLTOOL_KEYS_RULE +INTLTOOL_DIRECTORY_RULE +INTLTOOL_DESKTOP_RULE +INTLTOOL_EXTRACT +INTLTOOL_MERGE +INTLTOOL_UPDATE +POSUB +LTLIBINTL +LIBINTL +INTLLIBS +INTL_LIBTOOL_SUFFIX_PREFIX +INTLOBJS +GENCAT +INSTOBJEXT +DATADIRNAME +CATOBJEXT +USE_INCLUDED_LIBINTL +BUILD_INCLUDED_LIBINTL +INTLBISON +LTLIBICONV +LIBICONV +HAVE_WPRINTF +HAVE_SNPRINTF +HAVE_ASPRINTF +HAVE_POSIX_PRINTF +GLIBC21 +ALLOCA +RANLIB +MSGMERGE +XGETTEXT +GMSGFMT +MSGFMT +USE_NLS +MKINSTALLDIRS +GETTEXT_PACKAGE +WINDRES +am__fastdepCXX_FALSE +am__fastdepCXX_TRUE +CXXDEPMODE +ac_ct_CXX +CXXFLAGS +CXX +WIN32_FALSE +WIN32_TRUE +WIN32 +host_os +host_vendor +host_cpu +host +build_os +build_vendor +build_cpu +build +MAINT +MAINTAINER_MODE_FALSE +MAINTAINER_MODE_TRUE +DOC +GIT_OR_CVS_VERSION_FALSE +GIT_OR_CVS_VERSION_TRUE +CVS_VERSION_FALSE +CVS_VERSION_TRUE +GIT_VERSION_FALSE +GIT_VERSION_TRUE +EGREP +GREP +CPP +am__fastdepCC_FALSE +am__fastdepCC_TRUE +CCDEPMODE +AMDEPBACKSLASH +AMDEP_FALSE +AMDEP_TRUE +am__quote +am__include +DEPDIR +OBJEXT +EXEEXT +ac_ct_CC +CPPFLAGS +LDFLAGS +CFLAGS +CC +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='' +ac_user_opts=' +enable_option_checking +enable_dependency_tracking +enable_doc +enable_maintainer_mode +enable_nls +with_gnu_ld +enable_rpath +with_libiconv_prefix +with_included_gettext +with_libintl_prefix +with_gui +enable_toporouter +enable_toporouter_output +enable_dbus +enable_gl +with_x +with_printer +with_exporters +with_xdgdatadir +with_kdedatadir +enable_update_desktop_database +enable_update_mime_database +enable_gif +enable_jpeg +enable_png +enable_m4lib_png +enable_xrender +enable_xinerama +enable_dmalloc +enable_efence +enable_debug +enable_coord64 +enable_coord32 +enable_build_with_cxx +' + ac_precious_vars='build_alias +host_alias +target_alias +CC +CFLAGS +LDFLAGS +LIBS +CPPFLAGS +CPP +CXX +CXXFLAGS +CCC +YACC +YFLAGS +PKG_CONFIG +PKG_CONFIG_PATH +PKG_CONFIG_LIBDIR +CAIRO_CFLAGS +CAIRO_LIBS +DBUS_CFLAGS +DBUS_LIBS +XMKMF +GLIB_CFLAGS +GLIB_LIBS +GTK_CFLAGS +GTK_LIBS +GTKGLEXT_CFLAGS +GTKGLEXT_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=yes ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir=$ac_optarg ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build_alias ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build_alias=$ac_optarg ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; + + -datadir | --datadir | --datadi | --datad) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=*) + datadir=$ac_optarg ;; + + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + + -disable-* | --disable-*) + ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; + + -enable-* | --enable-*) + ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=\$ac_optarg ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix=$ac_optarg ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; + + -host | --host | --hos | --ho) + ac_prev=host_alias ;; + -host=* | --host=* | --hos=* | --ho=*) + host_alias=$ac_optarg ;; + + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir=$ac_optarg ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir=$ac_optarg ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir=$ac_optarg ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir=$ac_optarg ;; + + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst | --locals) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + localstatedir=$ac_optarg ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir=$ac_optarg ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c | -n) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir=$ac_optarg ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix=$ac_optarg ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix=$ac_optarg ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix=$ac_optarg ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name=$ac_optarg ;; + + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir=$ac_optarg ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir=$ac_optarg ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site=$ac_optarg ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir=$ac_optarg ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir=$ac_optarg ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target_alias ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target_alias=$ac_optarg ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; + + -with-* | --with-*) + ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=\$ac_optarg ;; + + -without-* | --without-*) + ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=no ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes=$ac_optarg ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries=$ac_optarg ;; + + -*) as_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + case $ac_envvar in #( + '' | [0-9]* | *[!_$as_cr_alnum]* ) + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; + esac + eval $ac_envvar=\$ac_optarg + export $ac_envvar ;; + + *) + # FIXME: should be removed in autoconf 3.0. + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} + ;; + + esac +done + +if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + as_fn_error $? "missing argument to $ac_option" +fi + +if test -n "$ac_unrecognized_opts"; then + case $enable_option_checking in + no) ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + esac +fi + +# Check all directory arguments for consistency. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir +do + eval ac_val=\$$ac_var + # Remove trailing slashes. + case $ac_val in + */ ) + ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` + eval $ac_var=\$ac_val;; + esac + # Be sure to have absolute directory names. + case $ac_val in + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + esac + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" +done + +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used" >&2 + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi + +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null + + +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + as_fn_error $? "working directory cannot be determined" +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + as_fn_error $? "pwd does not report name of working directory" + + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$as_myself" || +$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_myself" : 'X\(//\)[^/]' \| \ + X"$as_myself" : 'X\(//\)$' \| \ + X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_myself" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + srcdir=$ac_confdir + if test ! -r "$srcdir/$ac_unique_file"; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" +fi +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done + +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +\`configure' configures pcb 20110918 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/pcb] + --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 + +X features: + --x-includes=DIR X include files are in DIR + --x-libraries=DIR X library files are in DIR + +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 pcb 20110918:";; + 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] + --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors + --enable-doc Build and install the documentation [default=yes] + --enable-maintainer-mode enable make rules and dependencies not useful + (and sometimes confusing) to the casual installer + --disable-nls do not use Native Language Support + --disable-rpath do not hardcode runtime library paths + --enable-toporouter build toporouter [default=yes] + + --enable-toporouter-output + enable toporouter graphical output [default=no] + + --enable-dbus Enable DBUS IPC + --enable-gl Enable GL drawing (with GTK HID) + --disable-update-desktop-database + do not update desktop database after installation + --disable-update-mime-database + do not update mime database after installation + --disable-gif Disable support for gif output when the png HID is used [default=include gif support] + --disable-jpeg Disable support for JPEG output when the png HID is used [default=include JPEG support] + --disable-png Disable support for PNG output when the png HID is used [default=include PNG support] + --enable-m4lib-png Enable creating png previews for the m4 library + --disable-xrender Compile and link with Xrender default=yes + --disable-xinerama Compile and link with Xinerama default=yes + --enable-dmalloc Compile and link with dmalloc for malloc debugging default=no + --enable-efence Link with ElectricFence for malloc debugging default=no + --enable-debug Enable debugging code + --enable-coord64 Force 64-bit coordinate types + --enable-coord32 Force 32-bit coordinate types + --enable-build-with-cxx build with C++ compiler instead of C compiler + +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-gnu-ld assume the C compiler uses GNU ld default=no + --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib + --without-libiconv-prefix don't search for libiconv in includedir and libdir + --with-included-gettext use the GNU gettext library included here + --with-libintl-prefix[=DIR] search for libintl in DIR/include and DIR/lib + --without-libintl-prefix don't search for libintl in includedir and libdir + --with-gui= Specify the GUI to use: batch gtk lesstif [default=gtk] + --with-x use the X Window System + --with-printer= Specify the printer: lpr [default=lpr] + --with-exporters= Enable export devices: bom gerber gcode nelma png ps [default=bom gerber gcode nelma png ps] + --with-xdgdatadir=path Change where the theme icons +and mime registrations are installed [DATADIR] + --with-kdedatadir=path Change where the KDE mime reg +istrations are installed [DATADIR] + +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 + CXX C++ compiler command + CXXFLAGS C++ compiler flags + YACC The `Yet Another C Compiler' implementation to use. Defaults to + the first program found out of: `bison -y', `byacc', `yacc'. + YFLAGS The list of arguments that will be passed by default to $YACC. + This script will default YFLAGS to the empty string to avoid a + default value of `-d' given by some make applications. + 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 + CAIRO_CFLAGS + C compiler flags for CAIRO, overriding pkg-config + CAIRO_LIBS linker flags for CAIRO, overriding pkg-config + DBUS_CFLAGS C compiler flags for DBUS, overriding pkg-config + DBUS_LIBS linker flags for DBUS, overriding pkg-config + XMKMF Path to xmkmf, Makefile generator for X Window System + GLIB_CFLAGS C compiler flags for GLIB, overriding pkg-config + GLIB_LIBS linker flags for GLIB, overriding pkg-config + GTK_CFLAGS C compiler flags for GTK, overriding pkg-config + GTK_LIBS linker flags for GTK, overriding pkg-config + GTKGLEXT_CFLAGS + C compiler flags for GTKGLEXT, overriding pkg-config + GTKGLEXT_LIBS + linker flags for GTKGLEXT, overriding pkg-config + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + +Report bugs to the package provider. +_ACEOF +ac_status=$? +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d "$ac_dir" || + { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || + continue + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive + else + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } + done +fi + +test -n "$ac_init_help" && exit $ac_status +if $ac_init_version; then + cat <<\_ACEOF +pcb configure 20110918 +generated by GNU Autoconf 2.66 + +Copyright (C) 2010 Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +_ACEOF + exit +fi + +## ------------------------ ## +## Autoconf initialization. ## +## ------------------------ ## + +# ac_fn_c_try_compile LINENO +# -------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + as_fn_set_status $ac_retval + +} # ac_fn_c_try_compile + +# ac_fn_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; } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + as_fn_set_status $ac_retval + +} # ac_fn_c_try_cpp + +# ac_fn_c_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 "test \"\${$3+set}\"" = set; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval "test \"\${$3+set}\"" = set; then : + $as_echo_n "(cached) " >&6 +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 +$as_echo_n "checking $2 usability... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_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.$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;} + ;; +esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval "test \"\${$3+set}\"" = set; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=\$ac_header_compiler" +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +fi + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + +} # ac_fn_c_check_header_mongrel + +# ac_fn_c_try_run LINENO +# ---------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes +# that executables *can* be run. +ac_fn_c_try_run () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : + ac_retval=0 +else + $as_echo "$as_me: program exited with status $ac_status" >&5 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=$ac_status +fi + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + as_fn_set_status $ac_retval + +} # ac_fn_c_try_run + +# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists and can be compiled using the include files in +# INCLUDES, setting the cache variable VAR accordingly. +ac_fn_c_check_header_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval "test \"\${$3+set}\"" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + +} # ac_fn_c_check_header_compile + +# ac_fn_cxx_try_compile LINENO +# ---------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_cxx_try_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + as_fn_set_status $ac_retval + +} # ac_fn_cxx_try_compile + +# ac_fn_c_try_link LINENO +# ----------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_link () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest$ac_exeext + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + as_fn_set_status $ac_retval + +} # ac_fn_c_try_link + +# ac_fn_c_check_type LINENO TYPE VAR INCLUDES +# ------------------------------------------- +# Tests whether TYPE exists after having included INCLUDES, setting cache +# variable VAR accordingly. +ac_fn_c_check_type () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval "test \"\${$3+set}\"" = set; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=no" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +if (sizeof ($2)) + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +if (sizeof (($2))) + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + eval "$3=yes" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + +} # ac_fn_c_check_type + +# ac_fn_c_check_func LINENO FUNC VAR +# ---------------------------------- +# Tests whether FUNC exists, setting the cache variable VAR accordingly +ac_fn_c_check_func () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval "test \"\${$3+set}\"" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Define $2 to an innocuous variant, in case declares $2. + For example, HP-UX 11i declares gettimeofday. */ +#define $2 innocuous_$2 + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $2 (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $2 + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $2 (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$2 || defined __stub___$2 +choke me +#endif + +int +main () +{ +return $2 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + +} # ac_fn_c_check_func + +# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES +# -------------------------------------------- +# Tries to find the compile-time value of EXPR in a program that includes +# INCLUDES, setting VAR accordingly. Returns whether the value could be +# computed +ac_fn_c_compute_int () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) >= 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_lo=0 ac_mid=0 + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_hi=$ac_mid; break +else + as_fn_arith $ac_mid + 1 && ac_lo=$as_val + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) < 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_hi=-1 ac_mid=-1 + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) >= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_lo=$ac_mid; break +else + as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + ac_lo= ac_hi= +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_hi=$ac_mid +else + as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in #(( +?*) eval "$3=\$ac_lo"; ac_retval=0 ;; +'') ac_retval=1 ;; +esac + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +static long int longval () { return $2; } +static unsigned long int ulongval () { return $2; } +#include +#include +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (($2) < 0) + { + long int i = longval (); + if (i != ($2)) + return 1; + fprintf (f, "%ld", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ($2)) + return 1; + fprintf (f, "%lu", i); + } + /* Do not output a trailing newline, as this causes \r\n confusion + on some platforms. */ + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + echo >>conftest.val; read $3 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 pcb $as_me 20110918, which was +generated by GNU Autoconf 2.66. 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 + +as_fn_append ac_header_list " stdlib.h" +as_fn_append ac_header_list " unistd.h" +as_fn_append ac_header_list " sys/param.h" +# 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 + + + + +am__api_version='1.11' + +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 test "${ac_cv_path_install+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in #(( + ./ | .// | /[cC]/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + rm -rf conftest.one conftest.two conftest.dir + echo one > conftest.one + echo two > conftest.two + mkdir conftest.dir + if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && + test -s conftest.one && test -s conftest.two && + test -s conftest.dir/conftest.one && + test -s conftest.dir/conftest.two + then + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + fi + done + done + ;; +esac + + done +IFS=$as_save_IFS + +rm -rf conftest.one conftest.two conftest.dir + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + INSTALL=$ac_install_sh + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 +$as_echo "$INSTALL" >&6; } + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 +$as_echo_n "checking whether build environment is sane... " >&6; } +# Just in case +sleep 1 +echo timestamp > conftest.file +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[\\\"\#\$\&\'\`$am_lf]*) + as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; +esac +case $srcdir in + *[\\\"\#\$\&\'\`$am_lf\ \ ]*) + as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; +esac + +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + rm -f conftest.file + if test "$*" != "X $srcdir/configure conftest.file" \ + && test "$*" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + as_fn_error $? "ls -t appears to fail. Make sure there is not a broken +alias in your environment" "$LINENO" 5 + fi + + test "$2" = conftest.file + ) +then + # Ok. + : +else + as_fn_error $? "newly created file is older than distributed files! +Check your system clock" "$LINENO" 5 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +test "$program_prefix" != NONE && + program_transform_name="s&^&$program_prefix&;$program_transform_name" +# Use a double $ so make ignores it. +test "$program_suffix" != NONE && + program_transform_name="s&\$&$program_suffix&;$program_transform_name" +# Double any \ or $. +# By default was `s,x,x', remove it if useless. +ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' +program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` + +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` + +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 +$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} +fi + +if test x"${install_sh}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi + +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +if test "$cross_compiling" != no; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_STRIP+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_STRIP="strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 +$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } +if test -z "$MKDIR_P"; then + if test "${ac_cv_path_mkdir+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in mkdir gmkdir; do + for ac_exec_ext in '' $ac_executable_extensions; do + { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue + case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( + 'mkdir (GNU coreutils) '* | \ + 'mkdir (coreutils) '* | \ + 'mkdir (fileutils) '4.1*) + ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext + break 3;; + esac + done + done + done +IFS=$as_save_IFS + +fi + + test -d ./--version && rmdir ./--version + if test "${ac_cv_path_mkdir+set}" = set; then + MKDIR_P="$ac_cv_path_mkdir -p" + else + # As a last resort, use the slow shell script. Don't cache a + # value for MKDIR_P within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + MKDIR_P="$ac_install_sh -d" + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 +$as_echo "$MKDIR_P" >&6; } + +mkdir_p="$MKDIR_P" +case $mkdir_p in + [\\/$]* | ?:[\\/]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac + +for ac_prog in gawk mawk nawk awk +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_AWK+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AWK="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AWK=$ac_cv_prog_AWK +if test -n "$AWK"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 +$as_echo "$AWK" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$AWK" && break +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +set x ${MAKE-make} +ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then : + $as_echo_n "(cached) " >&6 +else + cat >conftest.make <<\_ACEOF +SHELL = /bin/sh +all: + @echo '@@@%%%=$(MAKE)=@@@%%%' +_ACEOF +# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac +rm -f conftest.make +fi +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + SET_MAKE= +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" +fi + +rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null + +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='pcb' + VERSION='20110918' + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE "$PACKAGE" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define VERSION "$VERSION" +_ACEOF + +# Some tools Automake needs. + +ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} + + +AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} + + +AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} + + +AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} + + +MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} + +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +# Always define AMTAR for backward compatibility. + +AMTAR=${AMTAR-"${am_missing_run}tar"} + +am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' + + + + + +DEPDIR="${am__leading_dot}deps" + +ac_config_commands="$ac_config_commands depfiles" + + +am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo this is the am__doit target +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 +$as_echo_n "checking for style of include used by $am_make... " >&6; } +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# Ignore all kinds of additional output from `make'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; +esac +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 +$as_echo "$_am_result" >&6; } +rm -f confinc confmf + +# Check whether --enable-dependency-tracking was given. +if test "${enable_dependency_tracking+set}" = set; then : + enableval=$enable_dependency_tracking; +fi + +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' +fi + if test "x$enable_dependency_tracking" != xno; then + AMDEP_TRUE= + AMDEP_FALSE='#' +else + AMDEP_TRUE='#' + AMDEP_FALSE= +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + fi +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl.exe + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl.exe +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_CC" && break +done + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi + +fi + + +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5; } + +# Provide some information about the compiler. +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done + +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } +ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` + +# The possible output files: +ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" + +ac_rmfiles= +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + * ) ac_rmfiles="$ac_rmfiles $ac_file";; + esac +done +rm -f $ac_rmfiles + +if { { ac_try="$ac_link_default" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link_default") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' +# in a Makefile. We should not override ac_cv_exeext if it was cached, +# so that the user can short-circuit this test for compilers unknown to +# Autoconf. +for ac_file in $ac_files '' +do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi + # We set ac_cv_exeext here because the later test for it is not + # safe: cross compilers may not add the suffix if given an `-o' + # argument, so we may need to know it at that point already. + # Even if this section looks crufty: it has the advantage of + # actually working. + break;; + * ) + break;; + esac +done +test "$ac_cv_exeext" = no && ac_cv_exeext= + +else + ac_file='' +fi +if test -z "$ac_file"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "C compiler cannot create executables +See \`config.log' for more details" "$LINENO" 5; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } +ac_exeext=$ac_cv_exeext + +rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out +ac_clean_files=$ac_clean_files_save +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 +$as_echo_n "checking for suffix of executables... " >&6; } +if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + break;; + * ) break;; + esac +done +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details" "$LINENO" 5; } +fi +rm -f conftest conftest$ac_cv_exeext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 +$as_echo "$ac_cv_exeext" >&6; } + +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +FILE *f = fopen ("conftest.out", "w"); + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +ac_clean_files="$ac_clean_files conftest.out" +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } +if test "$cross_compiling" != yes; then + { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if { ac_try='./conftest$ac_cv_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details" "$LINENO" 5; } + fi + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } + +rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out +ac_clean_files=$ac_clean_files_save +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 +$as_echo_n "checking for suffix of object files... " >&6; } +if test "${ac_cv_objext+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.o conftest.obj +if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compute suffix of object files: cannot compile +See \`config.log' for more details" "$LINENO" 5; } +fi +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 +$as_echo "$ac_cv_objext" >&6; } +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if test "${ac_cv_c_compiler_gnu+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_compiler_gnu=yes +else + ac_compiler_gnu=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= +fi +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if test "${ac_cv_prog_cc_g+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +else + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if test "${ac_cv_prog_cc_c89+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_c89=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; +esac +if test "x$ac_cv_prog_cc_c89" != xno; then : + +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +depcc="$CC" am_compiler_list= + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + am__universal=false + case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvisualcpp | msvcmsys) + # This compiler won't grok `-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CC_dependencies_compiler_type=none +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +fi + + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if test "${ac_cv_prog_CPP+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$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.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +{ $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.$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.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + +else + { { $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 grep that handles long lines and -e" >&5 +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +if test "${ac_cv_path_GREP+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$GREP"; then + ac_path_GREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue +# Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_GREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_GREP"; then + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_GREP=$GREP +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +$as_echo "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } +if test "${ac_cv_path_EGREP+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + if test -z "$EGREP"; then + ac_path_EGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue +# Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_EGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP"; then + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_EGREP=$EGREP +fi + + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +$as_echo "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if test "${ac_cv_header_stdc+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdc=yes +else + ac_cv_header_stdc=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +else + ac_cv_header_stdc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +$as_echo "#define STDC_HEADERS 1" >>confdefs.h + +fi + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + + ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" +if test "x$ac_cv_header_minix_config_h" = x""yes; then : + MINIX=yes +else + MINIX= +fi + + + if test "$MINIX" = yes; then + +$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h + + +$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h + + +$as_echo "#define _MINIX 1" >>confdefs.h + + fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 +$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } +if test "${ac_cv_safe_to_define___extensions__+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +# define __EXTENSIONS__ 1 + $ac_includes_default +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_safe_to_define___extensions__=yes +else + ac_cv_safe_to_define___extensions__=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 +$as_echo "$ac_cv_safe_to_define___extensions__" >&6; } + test $ac_cv_safe_to_define___extensions__ = yes && + $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h + + $as_echo "#define _ALL_SOURCE 1" >>confdefs.h + + $as_echo "#define _GNU_SOURCE 1" >>confdefs.h + + $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h + + $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h + + + +ac_config_headers="$ac_config_headers config.h" + + +########################################################################## +# +# Try to figure out if we are building from git sources. +# If we are then unless building of the documentation has +# been disabled then just require the user have all the right +# tools. Users building from a tarball won't need latex, makeinfo, +# etc. but if you're already downloading development sources, then +# it is not unreasonable to require development tools. What motivated +# this is that using maintainer mode proved to cause regular confusion. + +pcb_sources="tarball" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if you are building from a git checkout" >&5 +$as_echo_n "checking if you are building from a git checkout... " >&6; } +pcb_git_version=no +if test -f $srcdir/.gitignore ; then + pcb_git_version=yes + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + pcb_sources="GIT" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + if test x$pcb_git_version = xyes; then + GIT_VERSION_TRUE= + GIT_VERSION_FALSE='#' +else + GIT_VERSION_TRUE='#' + GIT_VERSION_FALSE= +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if you are building from a anoncvs checkout" >&5 +$as_echo_n "checking if you are building from a anoncvs checkout... " >&6; } +pcb_cvs_version=no +if test -f $srcdir/CVS/Root ; then + pcb_cvs_version=yes + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + pcb_sources="CVS" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + if test x$pcb_cvs_version = xyes; then + CVS_VERSION_TRUE= + CVS_VERSION_FALSE='#' +else + CVS_VERSION_TRUE='#' + CVS_VERSION_FALSE= +fi + + if test x$pcb_git_version = xyes -o x$pcb_cvs_version = xyes; then + GIT_OR_CVS_VERSION_TRUE= + GIT_OR_CVS_VERSION_FALSE='#' +else + GIT_OR_CVS_VERSION_TRUE='#' + GIT_OR_CVS_VERSION_FALSE= +fi + + + +########################################################################## +# +# See if we are supposed to build the docs +# + +docs_yesno=yes +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the documentation should be built" >&5 +$as_echo_n "checking if the documentation should be built... " >&6; } +# Check whether --enable-doc was given. +if test "${enable_doc+set}" = set; then : + enableval=$enable_doc; +if test "X$enable_doc" = "Xno" ; then + DOC="" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + docs_yesno=no +else + DOC=doc + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + docs_yesno=yes +fi + +else + +DOC=doc +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +docs_yesno=yes + +fi + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if maintainer mode is required" >&5 +$as_echo_n "checking if maintainer mode is required... " >&6; } +if test "$docs_yesno" = "yes" -a "$pcb_git_version" = "yes" ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes -- the documentation build is enabled and your sources are from git" >&5 +$as_echo "yes -- the documentation build is enabled and your sources are from git" >&6; } + enable_maintainer_mode=yes +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 +$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } + # Check whether --enable-maintainer-mode was given. +if test "${enable_maintainer_mode+set}" = set; then : + enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval +else + USE_MAINTAINER_MODE=no +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 +$as_echo "$USE_MAINTAINER_MODE" >&6; } + if test $USE_MAINTAINER_MODE = yes; then + MAINTAINER_MODE_TRUE= + MAINTAINER_MODE_FALSE='#' +else + MAINTAINER_MODE_TRUE='#' + MAINTAINER_MODE_FALSE= +fi + + MAINT=$MAINTAINER_MODE_TRUE + + + + +# Make sure we can run config.sub. +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 +$as_echo_n "checking build system type... " >&6; } +if test "${ac_cv_build+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_build_alias=$build_alias +test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` +test "x$ac_build_alias" = x && + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 +$as_echo "$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; +esac +build=$ac_cv_build +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_build +shift +build_cpu=$1 +build_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +build_os=$* +IFS=$ac_save_IFS +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +$as_echo_n "checking host system type... " >&6; } +if test "${ac_cv_host+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test "x$host_alias" = x; then + ac_cv_host=$ac_cv_build +else + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +$as_echo "$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; +esac +host=$ac_cv_host +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for windows" >&5 +$as_echo_n "checking for windows... " >&6; } +PCB_PATH_DELIMETER=":" +PCB_DIR_SEPARATOR_S="/" +PCB_DIR_SEPARATOR_C='/' +case $host in + *-*-cygwin* ) + CFLAGS="$CFLAGS ${CYGWIN_CFLAGS}" + CPPFLAGS="$CPPFLAGS ${CYGWIN_CPPFLAGS}" + ;; + + *-*-mingw* ) + WIN32=yes + CFLAGS="$CFLAGS ${MINGW_CFLAGS:--mms-bitfields -mwindows}" + CPPFLAGS="$CPPFLAGS ${MINGW_CPPFLAGS:--mms-bitfields -mwindows}" + ;; + + * ) + WIN32=no + ;; +esac + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $WIN32" >&5 +$as_echo "$WIN32" >&6; } + + if test x$WIN32 = xyes; then + WIN32_TRUE= + WIN32_FALSE='#' +else + WIN32_TRUE='#' + WIN32_FALSE= +fi + +if test "x$WIN32" = "xyes" ; then + PCB_PATH_DELIMETER=";" + PCB_DIR_SEPARATOR_S="\\\\" + PCB_DIR_SEPARATOR_C='\\' +fi + + +cat >>confdefs.h <<_ACEOF +#define PCB_DIR_SEPARATOR_C '$PCB_DIR_SEPARATOR_C' +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PCB_DIR_SEPARATOR_S "$PCB_DIR_SEPARATOR_S" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PCB_PATH_DELIMETER "$PCB_PATH_DELIMETER" +_ACEOF + + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + fi +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl.exe + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl.exe +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_CC" && break +done + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi + +fi + + +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5; } + +# Provide some information about the compiler. +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if test "${ac_cv_c_compiler_gnu+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_compiler_gnu=yes +else + ac_compiler_gnu=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= +fi +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if test "${ac_cv_prog_cc_g+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +else + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if test "${ac_cv_prog_cc_c89+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_c89=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; +esac +if test "x$ac_cv_prog_cc_c89" != xno; then : + +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +depcc="$CC" am_compiler_list= + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + am__universal=false + case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvisualcpp | msvcmsys) + # This compiler won't grok `-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CC_dependencies_compiler_type=none +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +fi + + +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +if test -z "$CXX"; then + if test -n "$CCC"; then + CXX=$CCC + else + if test -n "$ac_tool_prefix"; then + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CXX+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CXX"; then + ac_cv_prog_CXX="$CXX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CXX=$ac_cv_prog_CXX +if test -n "$CXX"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 +$as_echo "$CXX" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$CXX" && break + done +fi +if test -z "$CXX"; then + ac_ct_CXX=$CXX + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CXX"; then + ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CXX="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CXX=$ac_cv_prog_ac_ct_CXX +if test -n "$ac_ct_CXX"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 +$as_echo "$ac_ct_CXX" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_CXX" && break +done + + if test "x$ac_ct_CXX" = x; then + CXX="g++" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CXX=$ac_ct_CXX + fi +fi + + fi +fi +# Provide some information about the compiler. +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 +$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } +if test "${ac_cv_cxx_compiler_gnu+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + ac_compiler_gnu=yes +else + ac_compiler_gnu=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_cxx_compiler_gnu=$ac_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 +$as_echo "$ac_cv_cxx_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GXX=yes +else + GXX= +fi +ac_test_CXXFLAGS=${CXXFLAGS+set} +ac_save_CXXFLAGS=$CXXFLAGS +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 +$as_echo_n "checking whether $CXX accepts -g... " >&6; } +if test "${ac_cv_prog_cxx_g+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_save_cxx_werror_flag=$ac_cxx_werror_flag + ac_cxx_werror_flag=yes + ac_cv_prog_cxx_g=no + CXXFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + ac_cv_prog_cxx_g=yes +else + CXXFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + +else + ac_cxx_werror_flag=$ac_save_cxx_werror_flag + CXXFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + ac_cv_prog_cxx_g=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cxx_werror_flag=$ac_save_cxx_werror_flag +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 +$as_echo "$ac_cv_prog_cxx_g" >&6; } +if test "$ac_test_CXXFLAGS" = set; then + CXXFLAGS=$ac_save_CXXFLAGS +elif test $ac_cv_prog_cxx_g = yes; then + if test "$GXX" = yes; then + CXXFLAGS="-g -O2" + else + CXXFLAGS="-g" + fi +else + if test "$GXX" = yes; then + CXXFLAGS="-O2" + else + CXXFLAGS= + fi +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +depcc="$CXX" am_compiler_list= + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CXX_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + am__universal=false + case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvisualcpp | msvcmsys) + # This compiler won't grok `-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CXX_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CXX_dependencies_compiler_type=none +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } +CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then + am__fastdepCXX_TRUE= + am__fastdepCXX_FALSE='#' +else + am__fastdepCXX_TRUE='#' + am__fastdepCXX_FALSE= +fi + + + +if test "x$WIN32" = "xyes" ; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args. +set dummy ${ac_tool_prefix}windres; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_WINDRES+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$WINDRES"; then + ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_WINDRES="${ac_tool_prefix}windres" + $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 +WINDRES=$ac_cv_prog_WINDRES +if test -n "$WINDRES"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5 +$as_echo "$WINDRES" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_WINDRES"; then + ac_ct_WINDRES=$WINDRES + # Extract the first word of "windres", so it can be a program name with args. +set dummy windres; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_WINDRES"; then + ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_WINDRES="windres" + $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_WINDRES=$ac_cv_prog_ac_ct_WINDRES +if test -n "$ac_ct_WINDRES"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5 +$as_echo "$ac_ct_WINDRES" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_WINDRES" = x; then + WINDRES="no" + 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 + WINDRES=$ac_ct_WINDRES + fi +else + WINDRES="$ac_cv_prog_WINDRES" +fi + + if test "$WINDRES" = "no" ; then + as_fn_error $? "*** Could not find an implementation of windres in your PATH." "$LINENO" 5 + fi +fi + +# i18n +GETTEXT_PACKAGE=$PACKAGE + +cat >>confdefs.h <<_ACEOF +#define GETTEXT_PACKAGE "$GETTEXT_PACKAGE" +_ACEOF + + + + + + MKINSTALLDIRS= + if test -n "$ac_aux_dir"; then + case "$ac_aux_dir" in + /*) MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" ;; + *) MKINSTALLDIRS="\$(top_builddir)/$ac_aux_dir/mkinstalldirs" ;; + esac + fi + if test -z "$MKINSTALLDIRS"; then + MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" + fi + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5 +$as_echo_n "checking whether NLS is requested... " >&6; } + # Check whether --enable-nls was given. +if test "${enable_nls+set}" = set; then : + enableval=$enable_nls; USE_NLS=$enableval +else + USE_NLS=yes +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5 +$as_echo "$USE_NLS" >&6; } + + + + + + +# Prepare PATH_SEPARATOR. +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + +# Find out how to test for executable files. Don't use a zero-byte file, +# as systems may use methods other than mode bits to determine executability. +cat >conf$$.file <<_ASEOF +#! /bin/sh +exit 0 +_ASEOF +chmod +x conf$$.file +if test -x conf$$.file >/dev/null 2>&1; then + ac_executable_p="test -x" +else + ac_executable_p="test -f" +fi +rm -f conf$$.file + +# Extract the first word of "msgfmt", so it can be a program name with args. +set dummy msgfmt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_MSGFMT+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case "$MSGFMT" in + [\\/]* | ?:[\\/]*) + ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. + ;; + *) + ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$ac_save_IFS" + test -z "$ac_dir" && ac_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then + if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 && + (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then + ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext" + break 2 + fi + fi + done + done + IFS="$ac_save_IFS" + test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":" + ;; +esac +fi +MSGFMT="$ac_cv_path_MSGFMT" +if test "$MSGFMT" != ":"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5 +$as_echo "$MSGFMT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + # Extract the first word of "gmsgfmt", so it can be a program name with args. +set dummy gmsgfmt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_GMSGFMT+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $GMSGFMT in + [\\/]* | ?:[\\/]*) + ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_GMSGFMT="$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 + + test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" + ;; +esac +fi +GMSGFMT=$ac_cv_path_GMSGFMT +if test -n "$GMSGFMT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5 +$as_echo "$GMSGFMT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + + +# Prepare PATH_SEPARATOR. +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + +# Find out how to test for executable files. Don't use a zero-byte file, +# as systems may use methods other than mode bits to determine executability. +cat >conf$$.file <<_ASEOF +#! /bin/sh +exit 0 +_ASEOF +chmod +x conf$$.file +if test -x conf$$.file >/dev/null 2>&1; then + ac_executable_p="test -x" +else + ac_executable_p="test -f" +fi +rm -f conf$$.file + +# Extract the first word of "xgettext", so it can be a program name with args. +set dummy xgettext; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_XGETTEXT+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case "$XGETTEXT" in + [\\/]* | ?:[\\/]*) + ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. + ;; + *) + ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$ac_save_IFS" + test -z "$ac_dir" && ac_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then + if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 && + (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then + ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext" + break 2 + fi + fi + done + done + IFS="$ac_save_IFS" + test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" + ;; +esac +fi +XGETTEXT="$ac_cv_path_XGETTEXT" +if test "$XGETTEXT" != ":"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5 +$as_echo "$XGETTEXT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + rm -f messages.po + + +# Prepare PATH_SEPARATOR. +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + +# Find out how to test for executable files. Don't use a zero-byte file, +# as systems may use methods other than mode bits to determine executability. +cat >conf$$.file <<_ASEOF +#! /bin/sh +exit 0 +_ASEOF +chmod +x conf$$.file +if test -x conf$$.file >/dev/null 2>&1; then + ac_executable_p="test -x" +else + ac_executable_p="test -f" +fi +rm -f conf$$.file + +# Extract the first word of "msgmerge", so it can be a program name with args. +set dummy msgmerge; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_MSGMERGE+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case "$MSGMERGE" in + [\\/]* | ?:[\\/]*) + ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path. + ;; + *) + ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$ac_save_IFS" + test -z "$ac_dir" && ac_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then + if $ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1; then + ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext" + break 2 + fi + fi + done + done + IFS="$ac_save_IFS" + test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":" + ;; +esac +fi +MSGMERGE="$ac_cv_path_MSGMERGE" +if test "$MSGMERGE" != ":"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5 +$as_echo "$MSGMERGE" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + if test "$GMSGFMT" != ":"; then + if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 && + (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then + : ; + else + GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'` + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found $GMSGFMT program is not GNU msgfmt; ignore it" >&5 +$as_echo "found $GMSGFMT program is not GNU msgfmt; ignore it" >&6; } + GMSGFMT=":" + fi + fi + + if test "$XGETTEXT" != ":"; then + if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 && + (if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then + : ; + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found xgettext program is not GNU xgettext; ignore it" >&5 +$as_echo "found xgettext program is not GNU xgettext; ignore it" >&6; } + XGETTEXT=":" + fi + rm -f messages.po + fi + + ac_config_commands="$ac_config_commands default-1" + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_RANLIB+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 +$as_echo "$RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 +$as_echo "$ac_ct_RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + RANLIB=$ac_ct_RANLIB + fi +else + RANLIB="$ac_cv_prog_RANLIB" +fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strerror in -lcposix" >&5 +$as_echo_n "checking for strerror in -lcposix... " >&6; } +if test "${ac_cv_lib_cposix_strerror+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lcposix $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char strerror (); +int +main () +{ +return strerror (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_cposix_strerror=yes +else + ac_cv_lib_cposix_strerror=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_cposix_strerror" >&5 +$as_echo "$ac_cv_lib_cposix_strerror" >&6; } +if test "x$ac_cv_lib_cposix_strerror" = x""yes; then : + LIBS="$LIBS -lcposix" +fi + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 +$as_echo_n "checking for an ANSI C-conforming const... " >&6; } +if test "${ac_cv_c_const+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +/* FIXME: Include the comments suggested by Paul. */ +#ifndef __cplusplus + /* Ultrix mips cc rejects this. */ + typedef int charset[2]; + const charset cs; + /* SunOS 4.1.1 cc rejects this. */ + char const *const *pcpcc; + char **ppc; + /* NEC SVR4.0.2 mips cc rejects this. */ + struct point {int x, y;}; + static struct point const zero = {0,0}; + /* AIX XL C 1.02.0.0 rejects this. + It does not let you subtract one const X* pointer from another in + an arm of an if-expression whose if-part is not a constant + expression */ + const char *g = "string"; + pcpcc = &g + (g ? g-g : 0); + /* HPUX 7.0 cc rejects these. */ + ++pcpcc; + ppc = (char**) pcpcc; + pcpcc = (char const *const *) ppc; + { /* SCO 3.2v4 cc rejects this. */ + char *t; + char const *s = 0 ? (char *) 0 : (char const *) 0; + + *t++ = 0; + if (s) return 0; + } + { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ + int x[] = {25, 17}; + const int *foo = &x[0]; + ++foo; + } + { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ + typedef const int *iptr; + iptr p = 0; + ++p; + } + { /* AIX XL C 1.02.0.0 rejects this saying + "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ + struct s { int j; const int *ap[3]; }; + struct s *b; b->j = 5; + } + { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ + const int foo = 10; + if (!foo) return 0; + } + return !cs[0] && !zero.x; +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_const=yes +else + ac_cv_c_const=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 +$as_echo "$ac_cv_c_const" >&6; } +if test $ac_cv_c_const = no; then + +$as_echo "#define const /**/" >>confdefs.h + +fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signed" >&5 +$as_echo_n "checking for signed... " >&6; } +if test "${bh_cv_c_signed+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +signed char x; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + bh_cv_c_signed=yes +else + bh_cv_c_signed=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bh_cv_c_signed" >&5 +$as_echo "$bh_cv_c_signed" >&6; } + if test $bh_cv_c_signed = no; then + +$as_echo "#define signed /**/" >>confdefs.h + + fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 +$as_echo_n "checking for inline... " >&6; } +if test "${ac_cv_c_inline+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_c_inline=no +for ac_kw in inline __inline__ __inline; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifndef __cplusplus +typedef int foo_t; +static $ac_kw foo_t static_foo () {return 0; } +$ac_kw foo_t foo () {return 0; } +#endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_inline=$ac_kw +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$ac_cv_c_inline" != no && break +done + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 +$as_echo "$ac_cv_c_inline" >&6; } + +case $ac_cv_c_inline in + inline | yes) ;; + *) + case $ac_cv_c_inline in + no) ac_val=;; + *) ac_val=$ac_cv_c_inline;; + esac + cat >>confdefs.h <<_ACEOF +#ifndef __cplusplus +#define inline $ac_val +#endif +_ACEOF + ;; +esac + +ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default" +if test "x$ac_cv_type_off_t" = x""yes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define off_t long int +_ACEOF + +fi + +ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" +if test "x$ac_cv_type_size_t" = x""yes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define size_t unsigned int +_ACEOF + +fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long" >&5 +$as_echo_n "checking for long long... " >&6; } +if test "${ac_cv_type_long_long+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +long long ll = 1LL; int i = 63; +int +main () +{ +long long llmax = (long long) -1; + return ll << i | ll >> i | llmax / ll | llmax % ll; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_type_long_long=yes +else + ac_cv_type_long_long=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long" >&5 +$as_echo "$ac_cv_type_long_long" >&6; } + if test $ac_cv_type_long_long = yes; then + +$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h + + fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double" >&5 +$as_echo_n "checking for long double... " >&6; } +if test "${gt_cv_c_long_double+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test "$GCC" = yes; then + gt_cv_c_long_double=yes + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + /* The Stardent Vistra knows sizeof(long double), but does not support it. */ + long double foo = 0.0; + /* On Ultrix 4.3 cc, long double is 4 and double is 8. */ + int array [2*(sizeof(long double) >= sizeof(double)) - 1]; + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gt_cv_c_long_double=yes +else + gt_cv_c_long_double=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_long_double" >&5 +$as_echo "$gt_cv_c_long_double" >&6; } + if test $gt_cv_c_long_double = yes; then + +$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h + + fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5 +$as_echo_n "checking for wchar_t... " >&6; } +if test "${gt_cv_c_wchar_t+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + wchar_t foo = (wchar_t)'\0'; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gt_cv_c_wchar_t=yes +else + gt_cv_c_wchar_t=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5 +$as_echo "$gt_cv_c_wchar_t" >&6; } + if test $gt_cv_c_wchar_t = yes; then + +$as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h + + fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5 +$as_echo_n "checking for wint_t... " >&6; } +if test "${gt_cv_c_wint_t+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + wint_t foo = (wchar_t)'\0'; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gt_cv_c_wint_t=yes +else + gt_cv_c_wint_t=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5 +$as_echo "$gt_cv_c_wint_t" >&6; } + if test $gt_cv_c_wint_t = yes; then + +$as_echo "#define HAVE_WINT_T 1" >>confdefs.h + + fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5 +$as_echo_n "checking for inttypes.h... " >&6; } +if test "${jm_ac_cv_header_inttypes_h+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +int +main () +{ +uintmax_t i = (uintmax_t) -1; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + jm_ac_cv_header_inttypes_h=yes +else + jm_ac_cv_header_inttypes_h=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $jm_ac_cv_header_inttypes_h" >&5 +$as_echo "$jm_ac_cv_header_inttypes_h" >&6; } + if test $jm_ac_cv_header_inttypes_h = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_INTTYPES_H_WITH_UINTMAX 1 +_ACEOF + + fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint.h" >&5 +$as_echo_n "checking for stdint.h... " >&6; } +if test "${jm_ac_cv_header_stdint_h+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +int +main () +{ +uintmax_t i = (uintmax_t) -1; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + jm_ac_cv_header_stdint_h=yes +else + jm_ac_cv_header_stdint_h=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $jm_ac_cv_header_stdint_h" >&5 +$as_echo "$jm_ac_cv_header_stdint_h" >&6; } + if test $jm_ac_cv_header_stdint_h = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_STDINT_H_WITH_UINTMAX 1 +_ACEOF + + fi + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intmax_t" >&5 +$as_echo_n "checking for intmax_t... " >&6; } +if test "${gt_cv_c_intmax_t+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +#if HAVE_STDINT_H_WITH_UINTMAX +#include +#endif +#if HAVE_INTTYPES_H_WITH_UINTMAX +#include +#endif + +int +main () +{ +intmax_t x = -1; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gt_cv_c_intmax_t=yes +else + gt_cv_c_intmax_t=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_intmax_t" >&5 +$as_echo "$gt_cv_c_intmax_t" >&6; } + if test $gt_cv_c_intmax_t = yes; then + +$as_echo "#define HAVE_INTMAX_T 1" >>confdefs.h + + fi + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf() supports POSIX/XSI format strings" >&5 +$as_echo_n "checking whether printf() supports POSIX/XSI format strings... " >&6; } +if test "${gt_cv_func_printf_posix+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + if test "$cross_compiling" = yes; then : + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#if defined __NetBSD__ || defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__ + notposix +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "notposix" >/dev/null 2>&1; then : + gt_cv_func_printf_posix="guessing no" +else + gt_cv_func_printf_posix="guessing yes" +fi +rm -f conftest* + + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +/* The string "%2$d %1$d", with dollar characters protected from the shell's + dollar expansion (possibly an autoconf bug). */ +static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' }; +static char buf[100]; +int main () +{ + sprintf (buf, format, 33, 55); + return (strcmp (buf, "55 33") != 0); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gt_cv_func_printf_posix=yes +else + gt_cv_func_printf_posix=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_printf_posix" >&5 +$as_echo "$gt_cv_func_printf_posix" >&6; } + case $gt_cv_func_printf_posix in + *yes) + +$as_echo "#define HAVE_POSIX_PRINTF 1" >>confdefs.h + + ;; + esac + +# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works +# for constant arguments. Useless! +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 +$as_echo_n "checking for working alloca.h... " >&6; } +if test "${ac_cv_working_alloca_h+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +char *p = (char *) alloca (2 * sizeof (int)); + if (p) return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_working_alloca_h=yes +else + ac_cv_working_alloca_h=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 +$as_echo "$ac_cv_working_alloca_h" >&6; } +if test $ac_cv_working_alloca_h = yes; then + +$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 +$as_echo_n "checking for alloca... " >&6; } +if test "${ac_cv_func_alloca_works+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __GNUC__ +# define alloca __builtin_alloca +#else +# ifdef _MSC_VER +# include +# define alloca _alloca +# else +# ifdef HAVE_ALLOCA_H +# include +# else +# ifdef _AIX + #pragma alloca +# else +# ifndef alloca /* predefined by HP cc +Olibcalls */ +char *alloca (); +# endif +# endif +# endif +# endif +#endif + +int +main () +{ +char *p = (char *) alloca (1); + if (p) return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_func_alloca_works=yes +else + ac_cv_func_alloca_works=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 +$as_echo "$ac_cv_func_alloca_works" >&6; } + +if test $ac_cv_func_alloca_works = yes; then + +$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h + +else + # The SVR3 libPW and SVR4 libucb both contain incompatible functions +# that cause trouble. Some versions do not even contain alloca or +# contain a buggy version. If you still want to use their alloca, +# use ar to extract alloca.o from them instead of compiling alloca.c. + +ALLOCA=\${LIBOBJDIR}alloca.$ac_objext + +$as_echo "#define C_ALLOCA 1" >>confdefs.h + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 +$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } +if test "${ac_cv_os_cray+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if defined CRAY && ! defined CRAY2 +webecray +#else +wenotbecray +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "webecray" >/dev/null 2>&1; then : + ac_cv_os_cray=yes +else + ac_cv_os_cray=no +fi +rm -f conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 +$as_echo "$ac_cv_os_cray" >&6; } +if test $ac_cv_os_cray = yes; then + for ac_func in _getb67 GETB67 getb67; 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 CRAY_STACKSEG_END $ac_func +_ACEOF + + break +fi + + done +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 +$as_echo_n "checking stack direction for C alloca... " >&6; } +if test "${ac_cv_c_stack_direction+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + ac_cv_c_stack_direction=0 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int +find_stack_direction () +{ + static char *addr = 0; + auto char dummy; + if (addr == 0) + { + addr = &dummy; + return find_stack_direction (); + } + else + return (&dummy > addr) ? 1 : -1; +} + +int +main () +{ + return find_stack_direction () < 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_c_stack_direction=1 +else + ac_cv_c_stack_direction=-1 +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 +$as_echo "$ac_cv_c_stack_direction" >&6; } +cat >>confdefs.h <<_ACEOF +#define STACK_DIRECTION $ac_cv_c_stack_direction +_ACEOF + + +fi + + + + + for ac_header in $ac_header_list +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_func in getpagesize +do : + ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" +if test "x$ac_cv_func_getpagesize" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_GETPAGESIZE 1 +_ACEOF + +fi +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 +$as_echo_n "checking for working mmap... " >&6; } +if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + ac_cv_func_mmap_fixed_mapped=no +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +/* malloc might have been renamed as rpl_malloc. */ +#undef malloc + +/* Thanks to Mike Haertel and Jim Avera for this test. + Here is a matrix of mmap possibilities: + mmap private not fixed + mmap private fixed at somewhere currently unmapped + mmap private fixed at somewhere already mapped + mmap shared not fixed + mmap shared fixed at somewhere currently unmapped + mmap shared fixed at somewhere already mapped + For private mappings, we should verify that changes cannot be read() + back from the file, nor mmap's back from the file at a different + address. (There have been systems where private was not correctly + implemented like the infamous i386 svr4.0, and systems where the + VM page cache was not coherent with the file system buffer cache + like early versions of FreeBSD and possibly contemporary NetBSD.) + For shared mappings, we should conversely verify that changes get + propagated back to all the places they're supposed to be. + + Grep wants private fixed already mapped. + The main things grep needs to know about mmap are: + * does it exist and is it safe to write into the mmap'd area + * how to use it (BSD variants) */ + +#include +#include + +#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H +char *malloc (); +#endif + +/* This mess was copied from the GNU getpagesize.h. */ +#ifndef HAVE_GETPAGESIZE +# ifdef _SC_PAGESIZE +# define getpagesize() sysconf(_SC_PAGESIZE) +# else /* no _SC_PAGESIZE */ +# ifdef HAVE_SYS_PARAM_H +# include +# ifdef EXEC_PAGESIZE +# define getpagesize() EXEC_PAGESIZE +# else /* no EXEC_PAGESIZE */ +# ifdef NBPG +# define getpagesize() NBPG * CLSIZE +# ifndef CLSIZE +# define CLSIZE 1 +# endif /* no CLSIZE */ +# else /* no NBPG */ +# ifdef NBPC +# define getpagesize() NBPC +# else /* no NBPC */ +# ifdef PAGESIZE +# define getpagesize() PAGESIZE +# endif /* PAGESIZE */ +# endif /* no NBPC */ +# endif /* no NBPG */ +# endif /* no EXEC_PAGESIZE */ +# else /* no HAVE_SYS_PARAM_H */ +# define getpagesize() 8192 /* punt totally */ +# endif /* no HAVE_SYS_PARAM_H */ +# endif /* no _SC_PAGESIZE */ + +#endif /* no HAVE_GETPAGESIZE */ + +int +main () +{ + char *data, *data2, *data3; + const char *cdata2; + int i, pagesize; + int fd, fd2; + + pagesize = getpagesize (); + + /* First, make a file with some known garbage in it. */ + data = (char *) malloc (pagesize); + if (!data) + return 1; + for (i = 0; i < pagesize; ++i) + *(data + i) = rand (); + umask (0); + fd = creat ("conftest.mmap", 0600); + if (fd < 0) + return 2; + if (write (fd, data, pagesize) != pagesize) + return 3; + close (fd); + + /* Next, check that the tail of a page is zero-filled. File must have + non-zero length, otherwise we risk SIGBUS for entire page. */ + fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600); + if (fd2 < 0) + return 4; + cdata2 = ""; + if (write (fd2, cdata2, 1) != 1) + return 5; + data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L); + if (data2 == MAP_FAILED) + return 6; + for (i = 0; i < pagesize; ++i) + if (*(data2 + i)) + return 7; + close (fd2); + if (munmap (data2, pagesize)) + return 8; + + /* Next, try to mmap the file at a fixed address which already has + something else allocated at it. If we can, also make sure that + we see the same garbage. */ + fd = open ("conftest.mmap", O_RDWR); + if (fd < 0) + return 9; + if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, + MAP_PRIVATE | MAP_FIXED, fd, 0L)) + return 10; + for (i = 0; i < pagesize; ++i) + if (*(data + i) != *(data2 + i)) + return 11; + + /* Finally, make sure that changes to the mapped area do not + percolate back to the file as seen by read(). (This is a bug on + some variants of i386 svr4.0.) */ + for (i = 0; i < pagesize; ++i) + *(data2 + i) = *(data2 + i) + 1; + data3 = (char *) malloc (pagesize); + if (!data3) + return 12; + if (read (fd, data3, pagesize) != pagesize) + return 13; + for (i = 0; i < pagesize; ++i) + if (*(data + i) != *(data3 + i)) + return 14; + close (fd); + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_func_mmap_fixed_mapped=yes +else + ac_cv_func_mmap_fixed_mapped=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5 +$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; } +if test $ac_cv_func_mmap_fixed_mapped = yes; then + +$as_echo "#define HAVE_MMAP 1" >>confdefs.h + +fi +rm -f conftest.mmap conftest.txt + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library 2.1 or newer" >&5 +$as_echo_n "checking whether we are using the GNU C Library 2.1 or newer... " >&6; } +if test "${ac_cv_gnu_library_2_1+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#ifdef __GNU_LIBRARY__ + #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) + Lucky GNU user + #endif +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "Lucky GNU user" >/dev/null 2>&1; then : + ac_cv_gnu_library_2_1=yes +else + ac_cv_gnu_library_2_1=no +fi +rm -f conftest* + + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2_1" >&5 +$as_echo "$ac_cv_gnu_library_2_1" >&6; } + + GLIBC21="$ac_cv_gnu_library_2_1" + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether integer division by zero raises SIGFPE" >&5 +$as_echo_n "checking whether integer division by zero raises SIGFPE... " >&6; } +if test "${gt_cv_int_divbyzero_sigfpe+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + if test "$cross_compiling" = yes; then : + + # Guess based on the CPU. + case "$host_cpu" in + alpha* | i3456786 | m68k | s390*) + gt_cv_int_divbyzero_sigfpe="guessing yes";; + *) + gt_cv_int_divbyzero_sigfpe="guessing no";; + esac + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include + +static void +#ifdef __cplusplus +sigfpe_handler (int sig) +#else +sigfpe_handler (sig) int sig; +#endif +{ + /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */ + exit (sig != SIGFPE); +} + +int x = 1; +int y = 0; +int z; +int nan; + +int main () +{ + signal (SIGFPE, sigfpe_handler); +/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */ +#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP) + signal (SIGTRAP, sigfpe_handler); +#endif +/* Linux/SPARC yields signal SIGILL. */ +#if defined (__sparc__) && defined (__linux__) + signal (SIGILL, sigfpe_handler); +#endif + + z = x / y; + nan = y / y; + exit (1); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gt_cv_int_divbyzero_sigfpe=yes +else + gt_cv_int_divbyzero_sigfpe=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_int_divbyzero_sigfpe" >&5 +$as_echo "$gt_cv_int_divbyzero_sigfpe" >&6; } + case "$gt_cv_int_divbyzero_sigfpe" in + *yes) value=1;; + *) value=0;; + esac + +cat >>confdefs.h <<_ACEOF +#define INTDIV0_RAISES_SIGFPE $value +_ACEOF + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long" >&5 +$as_echo_n "checking for unsigned long long... " >&6; } +if test "${ac_cv_type_unsigned_long_long+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +unsigned long long ull = 1ULL; int i = 63; +int +main () +{ +unsigned long long ullmax = (unsigned long long) -1; + return ull << i | ull >> i | ullmax / ull | ullmax % ull; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_type_unsigned_long_long=yes +else + ac_cv_type_unsigned_long_long=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long" >&5 +$as_echo "$ac_cv_type_unsigned_long_long" >&6; } + if test $ac_cv_type_unsigned_long_long = yes; then + +$as_echo "#define HAVE_UNSIGNED_LONG_LONG 1" >>confdefs.h + + fi + + + + + if test $jm_ac_cv_header_inttypes_h = no && test $jm_ac_cv_header_stdint_h = no; then + + test $ac_cv_type_unsigned_long_long = yes \ + && ac_type='unsigned long long' \ + || ac_type='unsigned long' + +cat >>confdefs.h <<_ACEOF +#define uintmax_t $ac_type +_ACEOF + + else + +$as_echo "#define HAVE_UINTMAX_T 1" >>confdefs.h + + fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5 +$as_echo_n "checking for inttypes.h... " >&6; } +if test "${gt_cv_header_inttypes_h+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gt_cv_header_inttypes_h=yes +else + gt_cv_header_inttypes_h=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_header_inttypes_h" >&5 +$as_echo "$gt_cv_header_inttypes_h" >&6; } + if test $gt_cv_header_inttypes_h = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_INTTYPES_H 1 +_ACEOF + + fi + + + + if test $gt_cv_header_inttypes_h = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the inttypes.h PRIxNN macros are broken" >&5 +$as_echo_n "checking whether the inttypes.h PRIxNN macros are broken... " >&6; } +if test "${gt_cv_inttypes_pri_broken+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#ifdef PRId32 +char *p = PRId32; +#endif + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gt_cv_inttypes_pri_broken=no +else + gt_cv_inttypes_pri_broken=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_inttypes_pri_broken" >&5 +$as_echo "$gt_cv_inttypes_pri_broken" >&6; } + fi + if test "$gt_cv_inttypes_pri_broken" = yes; then + +cat >>confdefs.h <<_ACEOF +#define PRI_MACROS_BROKEN 1 +_ACEOF + + fi + + + for ac_header in stdint.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default" +if test "x$ac_cv_header_stdint_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_STDINT_H 1 +_ACEOF + +fi + +done + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIZE_MAX" >&5 +$as_echo_n "checking for SIZE_MAX... " >&6; } + result= + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#if HAVE_STDINT_H +#include +#endif +#ifdef SIZE_MAX +Found it +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "Found it" >/dev/null 2>&1; then : + result=yes +fi +rm -f conftest* + + if test -z "$result"; then + if ac_fn_c_compute_int "$LINENO" "~(size_t)0 / 10" "res_hi" "#include "; then : + +else + result=? +fi + + + if ac_fn_c_compute_int "$LINENO" "~(size_t)0 % 10" "res_lo" "#include "; then : + +else + result=? +fi + + + if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) <= sizeof (unsigned int)" "fits_in_uint" "#include "; then : + +else + result=? +fi + + + if test "$fits_in_uint" = 1; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + extern size_t foo; + extern unsigned long foo; + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + fits_in_uint=0 +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + if test -z "$result"; then + if test "$fits_in_uint" = 1; then + result="$res_hi$res_lo"U + else + result="$res_hi$res_lo"UL + fi + else + result='~(size_t)0' + fi + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $result" >&5 +$as_echo "$result" >&6; } + if test "$result" != yes; then + +cat >>confdefs.h <<_ACEOF +#define SIZE_MAX $result +_ACEOF + + fi + + + + for ac_header in stdint.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default" +if test "x$ac_cv_header_stdint_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_STDINT_H 1 +_ACEOF + +fi + +done + + + + if test "X$prefix" = "XNONE"; then + acl_final_prefix="$ac_default_prefix" + else + acl_final_prefix="$prefix" + fi + if test "X$exec_prefix" = "XNONE"; then + acl_final_exec_prefix='${prefix}' + else + acl_final_exec_prefix="$exec_prefix" + fi + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" + prefix="$acl_save_prefix" + + +# 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 + +# Prepare PATH_SEPARATOR. +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi +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 GCC" >&5 +$as_echo_n "checking for ld used by GCC... " >&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. + [\\/]* | [A-Za-z]:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the path of ld + ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do + ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 +$as_echo_n "checking for GNU ld... " >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 +$as_echo_n "checking for non-GNU ld... " >&6; } +fi +if test "${acl_cv_path_LD+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$LD"; then + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + acl_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some GNU ld's only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in + *GNU* | *'with BFD'*) + test "$with_gnu_ld" != no && break ;; + *) + test "$with_gnu_ld" != yes && break ;; + esac + fi + done + IFS="$ac_save_ifs" +else + acl_cv_path_LD="$LD" # Let the user override the test with a path. +fi +fi + +LD="$acl_cv_path_LD" +if test -n "$LD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 +$as_echo "$LD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 +$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } +if test "${acl_cv_prog_gnu_ld+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + # I'd rather use --version here, but apparently some GNU ld's only accept -v. +case `$LD -v 2>&1 &5 +$as_echo "$acl_cv_prog_gnu_ld" >&6; } +with_gnu_ld=$acl_cv_prog_gnu_ld + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 +$as_echo_n "checking for shared library run path origin... " >&6; } +if test "${acl_cv_rpath+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ + ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh + . ./conftest.sh + rm -f ./conftest.sh + acl_cv_rpath=done + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5 +$as_echo "$acl_cv_rpath" >&6; } + wl="$acl_cv_wl" + libext="$acl_cv_libext" + shlibext="$acl_cv_shlibext" + hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" + hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" + hardcode_direct="$acl_cv_hardcode_direct" + hardcode_minus_L="$acl_cv_hardcode_minus_L" + # Check whether --enable-rpath was given. +if test "${enable_rpath+set}" = set; then : + enableval=$enable_rpath; : +else + enable_rpath=yes +fi + + + + + + + + + use_additional=yes + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + +# Check whether --with-libiconv-prefix was given. +if test "${with_libiconv_prefix+set}" = set; then : + withval=$with_libiconv_prefix; + if test "X$withval" = "Xno"; then + use_additional=no + else + if test "X$withval" = "X"; then + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + else + additional_includedir="$withval/include" + additional_libdir="$withval/lib" + fi + fi + +fi + + LIBICONV= + LTLIBICONV= + INCICONV= + rpathdirs= + ltrpathdirs= + names_already_handled= + names_next_round='iconv ' + while test -n "$names_next_round"; do + names_this_round="$names_next_round" + names_next_round= + for name in $names_this_round; do + already_handled= + for n in $names_already_handled; do + if test "$n" = "$name"; then + already_handled=yes + break + fi + done + if test -z "$already_handled"; then + names_already_handled="$names_already_handled $name" + uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` + eval value=\"\$HAVE_LIB$uppername\" + if test -n "$value"; then + if test "$value" = yes; then + eval value=\"\$LIB$uppername\" + test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value" + eval value=\"\$LTLIB$uppername\" + test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value" + else + : + fi + else + found_dir= + found_la= + found_so= + found_a= + if test $use_additional = yes; then + if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then + found_dir="$additional_libdir" + found_so="$additional_libdir/lib$name.$shlibext" + if test -f "$additional_libdir/lib$name.la"; then + found_la="$additional_libdir/lib$name.la" + fi + else + if test -f "$additional_libdir/lib$name.$libext"; then + found_dir="$additional_libdir" + found_a="$additional_libdir/lib$name.$libext" + if test -f "$additional_libdir/lib$name.la"; then + found_la="$additional_libdir/lib$name.la" + fi + fi + fi + fi + if test "X$found_dir" = "X"; then + for x in $LDFLAGS $LTLIBICONV; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + case "$x" in + -L*) + dir=`echo "X$x" | sed -e 's/^X-L//'` + if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then + found_dir="$dir" + found_so="$dir/lib$name.$shlibext" + if test -f "$dir/lib$name.la"; then + found_la="$dir/lib$name.la" + fi + else + if test -f "$dir/lib$name.$libext"; then + found_dir="$dir" + found_a="$dir/lib$name.$libext" + if test -f "$dir/lib$name.la"; then + found_la="$dir/lib$name.la" + fi + fi + fi + ;; + esac + if test "X$found_dir" != "X"; then + break + fi + done + fi + if test "X$found_dir" != "X"; then + LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name" + if test "X$found_so" != "X"; then + if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then + LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" + else + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $found_dir" + fi + if test "$hardcode_direct" = yes; then + LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" + else + if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then + LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $found_dir" + fi + else + haveit= + for x in $LDFLAGS $LIBICONV; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir" + fi + if test "$hardcode_minus_L" != no; then + LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" + else + LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" + fi + fi + fi + fi + else + if test "X$found_a" != "X"; then + LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a" + else + LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name" + fi + fi + additional_includedir= + case "$found_dir" in + */lib | */lib/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` + additional_includedir="$basedir/include" + ;; + esac + if test "X$additional_includedir" != "X"; then + if test "X$additional_includedir" != "X/usr/include"; then + haveit= + if test "X$additional_includedir" = "X/usr/local/include"; then + if test -n "$GCC"; then + case $host_os in + linux*) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + for x in $CPPFLAGS $INCICONV; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-I$additional_includedir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_includedir"; then + INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir" + fi + fi + fi + fi + fi + if test -n "$found_la"; then + save_libdir="$libdir" + case "$found_la" in + */* | *\\*) . "$found_la" ;; + *) . "./$found_la" ;; + esac + libdir="$save_libdir" + for dep in $dependency_libs; do + case "$dep" in + -L*) + additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` + if test "X$additional_libdir" != "X/usr/lib"; then + haveit= + if test "X$additional_libdir" = "X/usr/local/lib"; then + if test -n "$GCC"; then + case $host_os in + linux*) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + haveit= + for x in $LDFLAGS $LIBICONV; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir" + fi + fi + haveit= + for x in $LDFLAGS $LTLIBICONV; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir" + fi + fi + fi + fi + ;; + -R*) + dir=`echo "X$dep" | sed -e 's/^X-R//'` + if test "$enable_rpath" != no; then + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $dir" + fi + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $dir" + fi + fi + ;; + -l*) + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` + ;; + *.la) + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` + ;; + *) + LIBICONV="${LIBICONV}${LIBICONV:+ }$dep" + LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep" + ;; + esac + done + fi + else + LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" + LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name" + fi + fi + fi + done + done + if test "X$rpathdirs" != "X"; then + if test -n "$hardcode_libdir_separator"; then + alldirs= + for found_dir in $rpathdirs; do + alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" + done + acl_save_libdir="$libdir" + libdir="$alldirs" + eval flag=\"$hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" + else + for found_dir in $rpathdirs; do + acl_save_libdir="$libdir" + libdir="$found_dir" + eval flag=\"$hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" + done + fi + fi + if test "X$ltrpathdirs" != "X"; then + for found_dir in $ltrpathdirs; do + LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir" + done + fi + + + + + + + + + ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default" +if test "x$ac_cv_type_ptrdiff_t" = x""yes; then : + +else + +$as_echo "#define ptrdiff_t long" >>confdefs.h + + +fi + + for ac_header in argz.h limits.h locale.h nl_types.h malloc.h stddef.h \ +stdlib.h string.h unistd.h sys/param.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 + + for ac_func in asprintf fwprintf getcwd getegid geteuid getgid getuid \ +mempcpy munmap putenv setenv setlocale snprintf stpcpy strcasecmp strdup \ +strtoul tsearch wcslen __argz_count __argz_stringify __argz_next \ +__fsetlocking +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 + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether _snprintf is declared" >&5 +$as_echo_n "checking whether _snprintf is declared... " >&6; } +if test "${ac_cv_have_decl__snprintf+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ + +#ifndef _snprintf + char *p = (char *) _snprintf; +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_have_decl__snprintf=yes +else + ac_cv_have_decl__snprintf=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_decl__snprintf" >&5 +$as_echo "$ac_cv_have_decl__snprintf" >&6; } + if test $ac_cv_have_decl__snprintf = yes; then + gt_value=1 + else + gt_value=0 + fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL__SNPRINTF $gt_value +_ACEOF + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether _snwprintf is declared" >&5 +$as_echo_n "checking whether _snwprintf is declared... " >&6; } +if test "${ac_cv_have_decl__snwprintf+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ + +#ifndef _snwprintf + char *p = (char *) _snwprintf; +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_have_decl__snwprintf=yes +else + ac_cv_have_decl__snwprintf=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_decl__snwprintf" >&5 +$as_echo "$ac_cv_have_decl__snwprintf" >&6; } + if test $ac_cv_have_decl__snwprintf = yes; then + gt_value=1 + else + gt_value=0 + fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL__SNWPRINTF $gt_value +_ACEOF + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether feof_unlocked is declared" >&5 +$as_echo_n "checking whether feof_unlocked is declared... " >&6; } +if test "${ac_cv_have_decl_feof_unlocked+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ + +#ifndef feof_unlocked + char *p = (char *) feof_unlocked; +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_have_decl_feof_unlocked=yes +else + ac_cv_have_decl_feof_unlocked=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_decl_feof_unlocked" >&5 +$as_echo "$ac_cv_have_decl_feof_unlocked" >&6; } + if test $ac_cv_have_decl_feof_unlocked = yes; then + gt_value=1 + else + gt_value=0 + fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_FEOF_UNLOCKED $gt_value +_ACEOF + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fgets_unlocked is declared" >&5 +$as_echo_n "checking whether fgets_unlocked is declared... " >&6; } +if test "${ac_cv_have_decl_fgets_unlocked+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ + +#ifndef fgets_unlocked + char *p = (char *) fgets_unlocked; +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_have_decl_fgets_unlocked=yes +else + ac_cv_have_decl_fgets_unlocked=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_decl_fgets_unlocked" >&5 +$as_echo "$ac_cv_have_decl_fgets_unlocked" >&6; } + if test $ac_cv_have_decl_fgets_unlocked = yes; then + gt_value=1 + else + gt_value=0 + fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_FGETS_UNLOCKED $gt_value +_ACEOF + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getc_unlocked is declared" >&5 +$as_echo_n "checking whether getc_unlocked is declared... " >&6; } +if test "${ac_cv_have_decl_getc_unlocked+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ + +#ifndef getc_unlocked + char *p = (char *) getc_unlocked; +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_have_decl_getc_unlocked=yes +else + ac_cv_have_decl_getc_unlocked=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_decl_getc_unlocked" >&5 +$as_echo "$ac_cv_have_decl_getc_unlocked" >&6; } + if test $ac_cv_have_decl_getc_unlocked = yes; then + gt_value=1 + else + gt_value=0 + fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_GETC_UNLOCKED $gt_value +_ACEOF + + + + case $gt_cv_func_printf_posix in + *yes) HAVE_POSIX_PRINTF=1 ;; + *) HAVE_POSIX_PRINTF=0 ;; + esac + + if test "$ac_cv_func_asprintf" = yes; then + HAVE_ASPRINTF=1 + else + HAVE_ASPRINTF=0 + fi + + if test "$ac_cv_func_snprintf" = yes; then + HAVE_SNPRINTF=1 + else + HAVE_SNPRINTF=0 + fi + + if test "$ac_cv_func_wprintf" = yes; then + HAVE_WPRINTF=1 + else + HAVE_WPRINTF=0 + fi + + + + + + + + am_save_CPPFLAGS="$CPPFLAGS" + + for element in $INCICONV; do + haveit= + for x in $CPPFLAGS; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X$element"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" + fi + done + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 +$as_echo_n "checking for iconv... " >&6; } +if test "${am_cv_func_iconv+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + am_cv_func_iconv="no, consider installing GNU libiconv" + am_cv_lib_iconv=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +int +main () +{ +iconv_t cd = iconv_open("",""); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + am_cv_func_iconv=yes +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test "$am_cv_func_iconv" != yes; then + am_save_LIBS="$LIBS" + LIBS="$LIBS $LIBICONV" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +int +main () +{ +iconv_t cd = iconv_open("",""); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + am_cv_lib_iconv=yes + am_cv_func_iconv=yes +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$am_save_LIBS" + fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5 +$as_echo "$am_cv_func_iconv" >&6; } + if test "$am_cv_func_iconv" = yes; then + +$as_echo "#define HAVE_ICONV 1" >>confdefs.h + + fi + if test "$am_cv_lib_iconv" = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5 +$as_echo_n "checking how to link with libiconv... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5 +$as_echo "$LIBICONV" >&6; } + else + CPPFLAGS="$am_save_CPPFLAGS" + LIBICONV= + LTLIBICONV= + fi + + + + if test "$am_cv_func_iconv" = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5 +$as_echo_n "checking for iconv declaration... " >&6; } + if test "${am_cv_proto_iconv+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +extern +#ifdef __cplusplus +"C" +#endif +#if defined(__STDC__) || defined(__cplusplus) +size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); +#else +size_t iconv(); +#endif + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + am_cv_proto_iconv_arg1="" +else + am_cv_proto_iconv_arg1="const" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);" +fi + + am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:- + }$am_cv_proto_iconv" >&5 +$as_echo "${ac_t:- + }$am_cv_proto_iconv" >&6; } + +cat >>confdefs.h <<_ACEOF +#define ICONV_CONST $am_cv_proto_iconv_arg1 +_ACEOF + + fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 +$as_echo_n "checking for nl_langinfo and CODESET... " >&6; } +if test "${am_cv_langinfo_codeset+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +char* cs = nl_langinfo(CODESET); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + am_cv_langinfo_codeset=yes +else + am_cv_langinfo_codeset=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5 +$as_echo "$am_cv_langinfo_codeset" >&6; } + if test $am_cv_langinfo_codeset = yes; then + +$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h + + fi + + if test $ac_cv_header_locale_h = yes; then + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5 +$as_echo_n "checking for LC_MESSAGES... " >&6; } +if test "${am_cv_val_LC_MESSAGES+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +return LC_MESSAGES + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + am_cv_val_LC_MESSAGES=yes +else + am_cv_val_LC_MESSAGES=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5 +$as_echo "$am_cv_val_LC_MESSAGES" >&6; } + if test $am_cv_val_LC_MESSAGES = yes; then + +$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h + + fi + + fi + + for ac_prog in bison +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_INTLBISON+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$INTLBISON"; then + ac_cv_prog_INTLBISON="$INTLBISON" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_INTLBISON="$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 +INTLBISON=$ac_cv_prog_INTLBISON +if test -n "$INTLBISON"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLBISON" >&5 +$as_echo "$INTLBISON" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$INTLBISON" && break +done + + if test -z "$INTLBISON"; then + ac_verc_fail=yes + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of bison" >&5 +$as_echo_n "checking version of bison... " >&6; } + ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'` + case $ac_prog_version in + '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; + 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*) + ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; + *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; + esac + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_prog_version" >&5 +$as_echo "$ac_prog_version" >&6; } + fi + if test $ac_verc_fail = yes; then + INTLBISON=: + fi + + + + + + + + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5 +$as_echo_n "checking whether NLS is requested... " >&6; } + # Check whether --enable-nls was given. +if test "${enable_nls+set}" = set; then : + enableval=$enable_nls; USE_NLS=$enableval +else + USE_NLS=yes +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5 +$as_echo "$USE_NLS" >&6; } + + + + + BUILD_INCLUDED_LIBINTL=no + USE_INCLUDED_LIBINTL=no + + LIBINTL= + LTLIBINTL= + POSUB= + + if test "$USE_NLS" = "yes"; then + gt_use_preinstalled_gnugettext=no + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether included gettext is requested" >&5 +$as_echo_n "checking whether included gettext is requested... " >&6; } + +# Check whether --with-included-gettext was given. +if test "${with_included_gettext+set}" = set; then : + withval=$with_included_gettext; nls_cv_force_use_gnu_gettext=$withval +else + nls_cv_force_use_gnu_gettext=no +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $nls_cv_force_use_gnu_gettext" >&5 +$as_echo "$nls_cv_force_use_gnu_gettext" >&6; } + + nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" + if test "$nls_cv_force_use_gnu_gettext" != "yes"; then + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5 +$as_echo_n "checking for GNU gettext in libc... " >&6; } +if test "${gt_cv_func_gnugettext1_libc+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +extern int _nl_msg_cat_cntr; +extern int *_nl_domain_bindings; +int +main () +{ +bindtextdomain ("", ""); +return (int) gettext ("") + _nl_msg_cat_cntr + *_nl_domain_bindings + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gt_cv_func_gnugettext1_libc=yes +else + gt_cv_func_gnugettext1_libc=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_gnugettext1_libc" >&5 +$as_echo "$gt_cv_func_gnugettext1_libc" >&6; } + + if test "$gt_cv_func_gnugettext1_libc" != "yes"; then + + + + use_additional=yes + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + +# Check whether --with-libintl-prefix was given. +if test "${with_libintl_prefix+set}" = set; then : + withval=$with_libintl_prefix; + if test "X$withval" = "Xno"; then + use_additional=no + else + if test "X$withval" = "X"; then + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + else + additional_includedir="$withval/include" + additional_libdir="$withval/lib" + fi + fi + +fi + + LIBINTL= + LTLIBINTL= + INCINTL= + rpathdirs= + ltrpathdirs= + names_already_handled= + names_next_round='intl ' + while test -n "$names_next_round"; do + names_this_round="$names_next_round" + names_next_round= + for name in $names_this_round; do + already_handled= + for n in $names_already_handled; do + if test "$n" = "$name"; then + already_handled=yes + break + fi + done + if test -z "$already_handled"; then + names_already_handled="$names_already_handled $name" + uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` + eval value=\"\$HAVE_LIB$uppername\" + if test -n "$value"; then + if test "$value" = yes; then + eval value=\"\$LIB$uppername\" + test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value" + eval value=\"\$LTLIB$uppername\" + test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value" + else + : + fi + else + found_dir= + found_la= + found_so= + found_a= + if test $use_additional = yes; then + if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then + found_dir="$additional_libdir" + found_so="$additional_libdir/lib$name.$shlibext" + if test -f "$additional_libdir/lib$name.la"; then + found_la="$additional_libdir/lib$name.la" + fi + else + if test -f "$additional_libdir/lib$name.$libext"; then + found_dir="$additional_libdir" + found_a="$additional_libdir/lib$name.$libext" + if test -f "$additional_libdir/lib$name.la"; then + found_la="$additional_libdir/lib$name.la" + fi + fi + fi + fi + if test "X$found_dir" = "X"; then + for x in $LDFLAGS $LTLIBINTL; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + case "$x" in + -L*) + dir=`echo "X$x" | sed -e 's/^X-L//'` + if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then + found_dir="$dir" + found_so="$dir/lib$name.$shlibext" + if test -f "$dir/lib$name.la"; then + found_la="$dir/lib$name.la" + fi + else + if test -f "$dir/lib$name.$libext"; then + found_dir="$dir" + found_a="$dir/lib$name.$libext" + if test -f "$dir/lib$name.la"; then + found_la="$dir/lib$name.la" + fi + fi + fi + ;; + esac + if test "X$found_dir" != "X"; then + break + fi + done + fi + if test "X$found_dir" != "X"; then + LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name" + if test "X$found_so" != "X"; then + if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then + LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" + else + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $found_dir" + fi + if test "$hardcode_direct" = yes; then + LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" + else + if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then + LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $found_dir" + fi + else + haveit= + for x in $LDFLAGS $LIBINTL; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir" + fi + if test "$hardcode_minus_L" != no; then + LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" + else + LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name" + fi + fi + fi + fi + else + if test "X$found_a" != "X"; then + LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a" + else + LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name" + fi + fi + additional_includedir= + case "$found_dir" in + */lib | */lib/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` + additional_includedir="$basedir/include" + ;; + esac + if test "X$additional_includedir" != "X"; then + if test "X$additional_includedir" != "X/usr/include"; then + haveit= + if test "X$additional_includedir" = "X/usr/local/include"; then + if test -n "$GCC"; then + case $host_os in + linux*) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + for x in $CPPFLAGS $INCINTL; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-I$additional_includedir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_includedir"; then + INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir" + fi + fi + fi + fi + fi + if test -n "$found_la"; then + save_libdir="$libdir" + case "$found_la" in + */* | *\\*) . "$found_la" ;; + *) . "./$found_la" ;; + esac + libdir="$save_libdir" + for dep in $dependency_libs; do + case "$dep" in + -L*) + additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` + if test "X$additional_libdir" != "X/usr/lib"; then + haveit= + if test "X$additional_libdir" = "X/usr/local/lib"; then + if test -n "$GCC"; then + case $host_os in + linux*) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + haveit= + for x in $LDFLAGS $LIBINTL; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir" + fi + fi + haveit= + for x in $LDFLAGS $LTLIBINTL; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir" + fi + fi + fi + fi + ;; + -R*) + dir=`echo "X$dep" | sed -e 's/^X-R//'` + if test "$enable_rpath" != no; then + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $dir" + fi + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $dir" + fi + fi + ;; + -l*) + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` + ;; + *.la) + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` + ;; + *) + LIBINTL="${LIBINTL}${LIBINTL:+ }$dep" + LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep" + ;; + esac + done + fi + else + LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name" + LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name" + fi + fi + fi + done + done + if test "X$rpathdirs" != "X"; then + if test -n "$hardcode_libdir_separator"; then + alldirs= + for found_dir in $rpathdirs; do + alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" + done + acl_save_libdir="$libdir" + libdir="$alldirs" + eval flag=\"$hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIBINTL="${LIBINTL}${LIBINTL:+ }$flag" + else + for found_dir in $rpathdirs; do + acl_save_libdir="$libdir" + libdir="$found_dir" + eval flag=\"$hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIBINTL="${LIBINTL}${LIBINTL:+ }$flag" + done + fi + fi + if test "X$ltrpathdirs" != "X"; then + for found_dir in $ltrpathdirs; do + LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir" + done + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5 +$as_echo_n "checking for GNU gettext in libintl... " >&6; } +if test "${gt_cv_func_gnugettext1_libintl+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + gt_save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $INCINTL" + gt_save_LIBS="$LIBS" + LIBS="$LIBS $LIBINTL" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +extern int _nl_msg_cat_cntr; +extern +#ifdef __cplusplus +"C" +#endif +const char *_nl_expand_alias (); +int +main () +{ +bindtextdomain ("", ""); +return (int) gettext ("") + _nl_msg_cat_cntr + *_nl_expand_alias (0) + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gt_cv_func_gnugettext1_libintl=yes +else + gt_cv_func_gnugettext1_libintl=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test "$gt_cv_func_gnugettext1_libintl" != yes && test -n "$LIBICONV"; then + LIBS="$LIBS $LIBICONV" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +extern int _nl_msg_cat_cntr; +extern +#ifdef __cplusplus +"C" +#endif +const char *_nl_expand_alias (); +int +main () +{ +bindtextdomain ("", ""); +return (int) gettext ("") + _nl_msg_cat_cntr + *_nl_expand_alias (0) + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + LIBINTL="$LIBINTL $LIBICONV" + LTLIBINTL="$LTLIBINTL $LTLIBICONV" + gt_cv_func_gnugettext1_libintl=yes + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + fi + CPPFLAGS="$gt_save_CPPFLAGS" + LIBS="$gt_save_LIBS" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_gnugettext1_libintl" >&5 +$as_echo "$gt_cv_func_gnugettext1_libintl" >&6; } + fi + + if test "$gt_cv_func_gnugettext1_libc" = "yes" \ + || { test "$gt_cv_func_gnugettext1_libintl" = "yes" \ + && test "$PACKAGE" != gettext-runtime \ + && test "$PACKAGE" != gettext-tools; }; then + gt_use_preinstalled_gnugettext=yes + else + LIBINTL= + LTLIBINTL= + INCINTL= + fi + + + if test "$gt_use_preinstalled_gnugettext" != "yes"; then + nls_cv_use_gnu_gettext=yes + fi + fi + + if test "$nls_cv_use_gnu_gettext" = "yes"; then + BUILD_INCLUDED_LIBINTL=yes + USE_INCLUDED_LIBINTL=yes + LIBINTL="\${top_builddir}/intl/libintl.a $LIBICONV" + LTLIBINTL="\${top_builddir}/intl/libintl.a $LTLIBICONV" + LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` + fi + + if test "$gt_use_preinstalled_gnugettext" = "yes" \ + || test "$nls_cv_use_gnu_gettext" = "yes"; then + CATOBJEXT=.gmo + fi + + + if test "$gt_use_preinstalled_gnugettext" = "yes" \ + || test "$nls_cv_use_gnu_gettext" = "yes"; then + +$as_echo "#define ENABLE_NLS 1" >>confdefs.h + + else + USE_NLS=no + fi + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5 +$as_echo_n "checking whether to use NLS... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5 +$as_echo "$USE_NLS" >&6; } + if test "$USE_NLS" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5 +$as_echo_n "checking where the gettext function comes from... " >&6; } + if test "$gt_use_preinstalled_gnugettext" = "yes"; then + if test "$gt_cv_func_gnugettext1_libintl" = "yes"; then + gt_source="external libintl" + else + gt_source="libc" + fi + else + gt_source="included intl directory" + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5 +$as_echo "$gt_source" >&6; } + fi + + if test "$USE_NLS" = "yes"; then + + if test "$gt_use_preinstalled_gnugettext" = "yes"; then + if test "$gt_cv_func_gnugettext1_libintl" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5 +$as_echo_n "checking how to link with libintl... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5 +$as_echo "$LIBINTL" >&6; } + + for element in $INCINTL; do + haveit= + for x in $CPPFLAGS; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X$element"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" + fi + done + + fi + + +$as_echo "#define HAVE_GETTEXT 1" >>confdefs.h + + +$as_echo "#define HAVE_DCGETTEXT 1" >>confdefs.h + + fi + + POSUB=po + fi + + + if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then + BUILD_INCLUDED_LIBINTL=yes + fi + + + + + + nls_cv_header_intl= + nls_cv_header_libgt= + + DATADIRNAME=share + + + INSTOBJEXT=.mo + + + GENCAT=gencat + + + if test "$USE_INCLUDED_LIBINTL" = yes; then + INTLOBJS="\$(GETTOBJS)" + fi + + + INTL_LIBTOOL_SUFFIX_PREFIX= + + + + INTLLIBS="$LIBINTL" + + + + + + + + +case "$am__api_version" in + 1.01234) + as_fn_error $? "Automake 1.5 or newer is required to use intltool" "$LINENO" 5 + ;; + *) + ;; +esac + +if test -n "0.35.0"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intltool >= 0.35.0" >&5 +$as_echo_n "checking for intltool >= 0.35.0... " >&6; } + + INTLTOOL_REQUIRED_VERSION_AS_INT=`echo 0.35.0 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'` + INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3` + INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'` + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_APPLIED_VERSION found" >&5 +$as_echo "$INTLTOOL_APPLIED_VERSION found" >&6; } + test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" || + as_fn_error $? "Your intltool is too old. You need intltool 0.35.0 or later." "$LINENO" 5 +fi + +# Extract the first word of "intltool-update", so it can be a program name with args. +set dummy intltool-update; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_INTLTOOL_UPDATE+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $INTLTOOL_UPDATE in + [\\/]* | ?:[\\/]*) + ac_cv_path_INTLTOOL_UPDATE="$INTLTOOL_UPDATE" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_INTLTOOL_UPDATE="$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 +INTLTOOL_UPDATE=$ac_cv_path_INTLTOOL_UPDATE +if test -n "$INTLTOOL_UPDATE"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_UPDATE" >&5 +$as_echo "$INTLTOOL_UPDATE" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +# Extract the first word of "intltool-merge", so it can be a program name with args. +set dummy intltool-merge; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_INTLTOOL_MERGE+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $INTLTOOL_MERGE in + [\\/]* | ?:[\\/]*) + ac_cv_path_INTLTOOL_MERGE="$INTLTOOL_MERGE" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_INTLTOOL_MERGE="$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 +INTLTOOL_MERGE=$ac_cv_path_INTLTOOL_MERGE +if test -n "$INTLTOOL_MERGE"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_MERGE" >&5 +$as_echo "$INTLTOOL_MERGE" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +# Extract the first word of "intltool-extract", so it can be a program name with args. +set dummy intltool-extract; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_INTLTOOL_EXTRACT+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $INTLTOOL_EXTRACT in + [\\/]* | ?:[\\/]*) + ac_cv_path_INTLTOOL_EXTRACT="$INTLTOOL_EXTRACT" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_INTLTOOL_EXTRACT="$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 +INTLTOOL_EXTRACT=$ac_cv_path_INTLTOOL_EXTRACT +if test -n "$INTLTOOL_EXTRACT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_EXTRACT" >&5 +$as_echo "$INTLTOOL_EXTRACT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then + as_fn_error $? "The intltool scripts were not found. Please install intltool." "$LINENO" 5 +fi + + INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' +INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' + INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' + INTLTOOL_PROP_RULE='%.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' + INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< $@' + INTLTOOL_PONG_RULE='%.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' + INTLTOOL_SERVER_RULE='%.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' + INTLTOOL_SHEET_RULE='%.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' +INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' + INTLTOOL_UI_RULE='%.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' + INTLTOOL_XML_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' + INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< $@' + INTLTOOL_XAM_RULE='%.xam: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' + INTLTOOL_KBD_RULE='%.kbd: %.kbd.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' + INTLTOOL_CAVES_RULE='%.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' + INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' + INTLTOOL_THEME_RULE='%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' + INTLTOOL_SERVICE_RULE='%.service: %.service.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' + INTLTOOL_POLICY_RULE='%.policy: %.policy.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +# Check the gettext tools to make sure they are GNU +# Extract the first word of "xgettext", so it can be a program name with args. +set dummy xgettext; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_XGETTEXT+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $XGETTEXT in + [\\/]* | ?:[\\/]*) + ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_XGETTEXT="$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 +XGETTEXT=$ac_cv_path_XGETTEXT +if test -n "$XGETTEXT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5 +$as_echo "$XGETTEXT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +# Extract the first word of "msgmerge", so it can be a program name with args. +set dummy msgmerge; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_MSGMERGE+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $MSGMERGE in + [\\/]* | ?:[\\/]*) + ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_MSGMERGE="$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 +MSGMERGE=$ac_cv_path_MSGMERGE +if test -n "$MSGMERGE"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5 +$as_echo "$MSGMERGE" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +# Extract the first word of "msgfmt", so it can be a program name with args. +set dummy msgfmt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_MSGFMT+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $MSGFMT in + [\\/]* | ?:[\\/]*) + ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_MSGFMT="$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 +MSGFMT=$ac_cv_path_MSGFMT +if test -n "$MSGFMT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5 +$as_echo "$MSGFMT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +# Extract the first word of "gmsgfmt", so it can be a program name with args. +set dummy gmsgfmt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_GMSGFMT+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $GMSGFMT in + [\\/]* | ?:[\\/]*) + ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_GMSGFMT="$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 + + test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" + ;; +esac +fi +GMSGFMT=$ac_cv_path_GMSGFMT +if test -n "$GMSGFMT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5 +$as_echo "$GMSGFMT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then + as_fn_error $? "GNU gettext tools not found; required for intltool" "$LINENO" 5 +fi +xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`" +mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`" +mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`" +if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then + as_fn_error $? "GNU gettext tools not found; required for intltool" "$LINENO" 5 +fi + +# Extract the first word of "perl", so it can be a program name with args. +set dummy perl; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_INTLTOOL_PERL+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $INTLTOOL_PERL in + [\\/]* | ?:[\\/]*) + ac_cv_path_INTLTOOL_PERL="$INTLTOOL_PERL" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_INTLTOOL_PERL="$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 +INTLTOOL_PERL=$ac_cv_path_INTLTOOL_PERL +if test -n "$INTLTOOL_PERL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_PERL" >&5 +$as_echo "$INTLTOOL_PERL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +if test -z "$INTLTOOL_PERL"; then + as_fn_error $? "perl not found" "$LINENO" 5 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for perl >= 5.8.1" >&5 +$as_echo_n "checking for perl >= 5.8.1... " >&6; } +$INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1 +if test $? -ne 0; then + as_fn_error $? "perl 5.8.1 is required for intltool" "$LINENO" 5 +else + IT_PERL_VERSION="`$INTLTOOL_PERL -e \"printf '%vd', $^V\"`" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $IT_PERL_VERSION" >&5 +$as_echo "$IT_PERL_VERSION" >&6; } +fi +if test "x" != "xno-xml"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XML::Parser" >&5 +$as_echo_n "checking for XML::Parser... " >&6; } + if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 +$as_echo "ok" >&6; } + else + as_fn_error $? "XML::Parser perl module is required for intltool" "$LINENO" 5 + fi +fi + +# Substitute ALL_LINGUAS so we can use it in po/Makefile + + +# Set DATADIRNAME correctly if it is not set yet +# (copied from glib-gettext.m4) +if test -z "$DATADIRNAME"; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +extern int _nl_msg_cat_cntr; + return _nl_msg_cat_cntr + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + DATADIRNAME=share +else + case $host in + *-*-solaris*) + ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset" +if test "x$ac_cv_func_bind_textdomain_codeset" = x""yes; then : + DATADIRNAME=share +else + DATADIRNAME=lib +fi + + ;; + *) + DATADIRNAME=lib + ;; + esac +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 +$as_echo_n "checking for inline... " >&6; } +if test "${ac_cv_c_inline+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_c_inline=no +for ac_kw in inline __inline__ __inline; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifndef __cplusplus +typedef int foo_t; +static $ac_kw foo_t static_foo () {return 0; } +$ac_kw foo_t foo () {return 0; } +#endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_inline=$ac_kw +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$ac_cv_c_inline" != no && break +done + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 +$as_echo "$ac_cv_c_inline" >&6; } + +case $ac_cv_c_inline in + inline | yes) ;; + *) + case $ac_cv_c_inline in + no) ac_val=;; + *) ac_val=$ac_cv_c_inline;; + esac + cat >>confdefs.h <<_ACEOF +#ifndef __cplusplus +#define inline $ac_val +#endif +_ACEOF + ;; +esac + + case $ac_cv_prog_cc_stdc in #( + no) : + ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; #( + *) : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5 +$as_echo_n "checking for $CC option to accept ISO C99... " >&6; } +if test "${ac_cv_prog_cc_c99+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c99=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include +#include + +// Check varargs macros. These examples are taken from C99 6.10.3.5. +#define debug(...) fprintf (stderr, __VA_ARGS__) +#define showlist(...) puts (#__VA_ARGS__) +#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) +static void +test_varargs_macros (void) +{ + int x = 1234; + int y = 5678; + debug ("Flag"); + debug ("X = %d\n", x); + showlist (The first, second, and third items.); + report (x>y, "x is %d but y is %d", x, y); +} + +// Check long long types. +#define BIG64 18446744073709551615ull +#define BIG32 4294967295ul +#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) +#if !BIG_OK + your preprocessor is broken; +#endif +#if BIG_OK +#else + your preprocessor is broken; +#endif +static long long int bignum = -9223372036854775807LL; +static unsigned long long int ubignum = BIG64; + +struct incomplete_array +{ + int datasize; + double data[]; +}; + +struct named_init { + int number; + const wchar_t *name; + double average; +}; + +typedef const char *ccp; + +static inline int +test_restrict (ccp restrict text) +{ + // See if C++-style comments work. + // Iterate through items via the restricted pointer. + // Also check for declarations in for loops. + for (unsigned int i = 0; *(text+i) != '\0'; ++i) + continue; + return 0; +} + +// Check varargs and va_copy. +static void +test_varargs (const char *format, ...) +{ + va_list args; + va_start (args, format); + va_list args_copy; + va_copy (args_copy, args); + + const char *str; + int number; + float fnumber; + + while (*format) + { + switch (*format++) + { + case 's': // string + str = va_arg (args_copy, const char *); + break; + case 'd': // int + number = va_arg (args_copy, int); + break; + case 'f': // float + fnumber = va_arg (args_copy, double); + break; + default: + break; + } + } + va_end (args_copy); + va_end (args); +} + +int +main () +{ + + // Check bool. + _Bool success = false; + + // Check restrict. + if (test_restrict ("String literal") == 0) + success = true; + char *restrict newvar = "Another string"; + + // Check varargs. + test_varargs ("s, d' f .", "string", 65, 34.234); + test_varargs_macros (); + + // Check flexible array members. + struct incomplete_array *ia = + malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); + ia->datasize = 10; + for (int i = 0; i < ia->datasize; ++i) + ia->data[i] = i * 1.234; + + // Check named initializers. + struct named_init ni = { + .number = 34, + .name = L"Test wide string", + .average = 543.34343, + }; + + ni.number = 58; + + int dynamic_array[ni.number]; + dynamic_array[ni.number - 1] = 543; + + // work around unused variable warnings + return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x' + || dynamic_array[ni.number - 1] != 543); + + ; + return 0; +} +_ACEOF +for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99 +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_c99=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c99" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c99" 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_c99" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 +$as_echo "$ac_cv_prog_cc_c99" >&6; } ;; +esac +if test "x$ac_cv_prog_cc_c99" != xno; then : + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if test "${ac_cv_prog_cc_c89+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_c89=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; +esac +if test "x$ac_cv_prog_cc_c89" != xno; then : + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 +else + ac_cv_prog_cc_stdc=no +fi + +fi + ;; +esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5 +$as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; } + if test "${ac_cv_prog_cc_stdc+set}" = set; then : + $as_echo_n "(cached) " >&6 +fi + + case $ac_cv_prog_cc_stdc in #( + no) : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; #( + '') : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; #( + *) : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_stdc" >&5 +$as_echo "$ac_cv_prog_cc_stdc" >&6; } ;; +esac + +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 "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\"" = set; 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 + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if test "${ac_cv_prog_CPP+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$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.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +{ $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.$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.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + +else + { { $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 + +for ac_prog in gawk mawk nawk awk +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_AWK+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AWK="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AWK=$ac_cv_prog_AWK +if test -n "$AWK"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 +$as_echo "$AWK" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$AWK" && break +done + + + +for ac_prog in flex lex +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_LEX+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$LEX"; then + ac_cv_prog_LEX="$LEX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_LEX="$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 +LEX=$ac_cv_prog_LEX +if test -n "$LEX"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5 +$as_echo "$LEX" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$LEX" && break +done +test -n "$LEX" || LEX=":" + +if test "x$LEX" != "x:"; then + cat >conftest.l <<_ACEOF +%% +a { ECHO; } +b { REJECT; } +c { yymore (); } +d { yyless (1); } +e { yyless (input () != 0); } +f { unput (yytext[0]); } +. { BEGIN INITIAL; } +%% +#ifdef YYTEXT_POINTER +extern char *yytext; +#endif +int +main (void) +{ + return ! yylex () + ! yywrap (); +} +_ACEOF +{ { ac_try="$LEX conftest.l" +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 "$LEX conftest.l") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking lex output file root" >&5 +$as_echo_n "checking lex output file root... " >&6; } +if test "${ac_cv_prog_lex_root+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + +if test -f lex.yy.c; then + ac_cv_prog_lex_root=lex.yy +elif test -f lexyy.c; then + ac_cv_prog_lex_root=lexyy +else + as_fn_error $? "cannot find output from $LEX; giving up" "$LINENO" 5 +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5 +$as_echo "$ac_cv_prog_lex_root" >&6; } +LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root + +if test -z "${LEXLIB+set}"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex library" >&5 +$as_echo_n "checking lex library... " >&6; } +if test "${ac_cv_lib_lex+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + ac_save_LIBS=$LIBS + ac_cv_lib_lex='none needed' + for ac_lib in '' -lfl -ll; do + LIBS="$ac_lib $ac_save_LIBS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +`cat $LEX_OUTPUT_ROOT.c` +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_lex=$ac_lib +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + test "$ac_cv_lib_lex" != 'none needed' && break + done + LIBS=$ac_save_LIBS + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5 +$as_echo "$ac_cv_lib_lex" >&6; } + test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5 +$as_echo_n "checking whether yytext is a pointer... " >&6; } +if test "${ac_cv_prog_lex_yytext_pointer+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + # POSIX says lex can declare yytext either as a pointer or an array; the +# default is implementation-dependent. Figure out which it is, since +# not all implementations provide the %pointer and %array declarations. +ac_cv_prog_lex_yytext_pointer=no +ac_save_LIBS=$LIBS +LIBS="$LEXLIB $ac_save_LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#define YYTEXT_POINTER 1 +`cat $LEX_OUTPUT_ROOT.c` +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_prog_lex_yytext_pointer=yes +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_save_LIBS + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5 +$as_echo "$ac_cv_prog_lex_yytext_pointer" >&6; } +if test $ac_cv_prog_lex_yytext_pointer = yes; then + +$as_echo "#define YYTEXT_POINTER 1" >>confdefs.h + +fi +rm -f conftest.l $LEX_OUTPUT_ROOT.c + +fi +if test "$LEX" = :; then + LEX=${am_missing_run}flex +fi +# Extract the first word of "$LEX", so it can be a program name with args. +set dummy $LEX; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_LEX_PATH+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $LEX_PATH in + [\\/]* | ?:[\\/]*) + ac_cv_path_LEX_PATH="$LEX_PATH" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_LEX_PATH="$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 + + test -z "$ac_cv_path_LEX_PATH" && ac_cv_path_LEX_PATH="notfound" + ;; +esac +fi +LEX_PATH=$ac_cv_path_LEX_PATH +if test -n "$LEX_PATH"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LEX_PATH" >&5 +$as_echo "$LEX_PATH" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +if test "$LEX_PATH" = "notfound" ; then + as_fn_error $? "Couldn't find a usable lex program. +Please install flex which is available from +ftp://ftp.gnu.org/pub/non-gnu/flex/ +" "$LINENO" 5 +fi + + +for ac_prog in 'bison -y' byacc +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_YACC+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$YACC"; then + ac_cv_prog_YACC="$YACC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_YACC="$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 +YACC=$ac_cv_prog_YACC +if test -n "$YACC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5 +$as_echo "$YACC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$YACC" && break +done +test -n "$YACC" || YACC="yacc" + +# Extract the first word of "$YACC", so it can be a program name with args. +set dummy $YACC; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_YACC_PATH+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $YACC_PATH in + [\\/]* | ?:[\\/]*) + ac_cv_path_YACC_PATH="$YACC_PATH" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_YACC_PATH="$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 + + test -z "$ac_cv_path_YACC_PATH" && ac_cv_path_YACC_PATH="notfound" + ;; +esac +fi +YACC_PATH=$ac_cv_path_YACC_PATH +if test -n "$YACC_PATH"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC_PATH" >&5 +$as_echo "$YACC_PATH" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +if test "$YACC_PATH" = "notfound" ; then + as_fn_error $? "Couldn't find a usable yacc program. +Please install bison which is available from +ftp://ftp.gnu.org/pub/gnu/bison/ +" "$LINENO" 5 +fi + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_RANLIB+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 +$as_echo "$RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 +$as_echo "$ac_ct_RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + RANLIB=$ac_ct_RANLIB + fi +else + RANLIB="$ac_cv_prog_RANLIB" +fi + + +# +# Used for building the icons +# +# Extract the first word of "xpmtoppm", so it can be a program name with args. +set dummy xpmtoppm; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_XPMTOPPM+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $XPMTOPPM in + [\\/]* | ?:[\\/]*) + ac_cv_path_XPMTOPPM="$XPMTOPPM" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_XPMTOPPM="$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 + + test -z "$ac_cv_path_XPMTOPPM" && ac_cv_path_XPMTOPPM="notfound" + ;; +esac +fi +XPMTOPPM=$ac_cv_path_XPMTOPPM +if test -n "$XPMTOPPM"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XPMTOPPM" >&5 +$as_echo "$XPMTOPPM" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +# Extract the first word of "ppmtowinicon", so it can be a program name with args. +set dummy ppmtowinicon; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_PPMTOWINICON+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $PPMTOWINICON in + [\\/]* | ?:[\\/]*) + ac_cv_path_PPMTOWINICON="$PPMTOWINICON" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PPMTOWINICON="$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 + + test -z "$ac_cv_path_PPMTOWINICON" && ac_cv_path_PPMTOWINICON="notfound" + ;; +esac +fi +PPMTOWINICON=$ac_cv_path_PPMTOWINICON +if test -n "$PPMTOWINICON"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PPMTOWINICON" >&5 +$as_echo "$PPMTOWINICON" >&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 test "${ac_cv_path_CONVERT+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $CONVERT in + [\\/]* | ?:[\\/]*) + ac_cv_path_CONVERT="$CONVERT" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_CONVERT="$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 + + test -z "$ac_cv_path_CONVERT" && ac_cv_path_CONVERT="notfound" + ;; +esac +fi +CONVERT=$ac_cv_path_CONVERT +if test -n "$CONVERT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONVERT" >&5 +$as_echo "$CONVERT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + +########################################################################## +# +# +if test "X$docs_yesno" = "Xyes" -a "X$pcb_git_version" = "Xyes" ; then + # Extract the first word of "makeinfo", so it can be a program name with args. +set dummy makeinfo; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_MKINFO+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $MKINFO in + [\\/]* | ?:[\\/]*) + ac_cv_path_MKINFO="$MKINFO" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_MKINFO="$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 + + test -z "$ac_cv_path_MKINFO" && ac_cv_path_MKINFO="no" + ;; +esac +fi +MKINFO=$ac_cv_path_MKINFO +if test -n "$MKINFO"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKINFO" >&5 +$as_echo "$MKINFO" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + if test "X$MKINFO" != "Xno"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU makeinfo version >= 4.6" >&5 +$as_echo_n "checking for GNU makeinfo version >= 4.6... " >&6; } + v=`$MKINFO --version | grep "GNU texinfo"` + if test $? -ne 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: non-GNU" >&5 +$as_echo "non-GNU" >&6; } + MKINFO="no" + fi + fi + if test "X$MKINFO" != "Xno"; then + vmajor=`echo "$v" | sed 's/.* \([0-9]*\)\.\([0-9]*\)$/\1/'` + vminor=`echo "$v" | sed 's/.* \([0-9]*\)\.\([0-9]*\)$/\2/'` + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vmajor.$vminor" >&5 +$as_echo "$vmajor.$vminor" >&6; } + if test "$vmajor" -lt 4 \ + || (test "$vmajor" -eq 4 && test "$vminor" -lt 6); then + MKINFO=no + fi + fi + if test "X$MKINFO" = "Xno"; then + as_fn_error $? "You have requested a build +of the documentation. For this to work, you must have version 4.6 or newer of +the GNU texinfo package. You seem to have + +$v + +Please update to a newer version of texinfo or disable building of +the documentation with --disable-doc +" "$LINENO" 5 + fi + + # Extract the first word of "texi2dvi", so it can be a program name with args. +set dummy texi2dvi; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_TEXI2DVI+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $TEXI2DVI in + [\\/]* | ?:[\\/]*) + ac_cv_path_TEXI2DVI="$TEXI2DVI" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_TEXI2DVI="$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 + + test -z "$ac_cv_path_TEXI2DVI" && ac_cv_path_TEXI2DVI="no" + ;; +esac +fi +TEXI2DVI=$ac_cv_path_TEXI2DVI +if test -n "$TEXI2DVI"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEXI2DVI" >&5 +$as_echo "$TEXI2DVI" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + if test "X$TEXI2DVI" = "Xno"; then + as_fn_error $? "You have requested a build +of the documentation. For this to work, you must have the texi2dvi program +installed. Alternatively, you can disable building the documentation with +--disable-doc." "$LINENO" 5 + fi + + + # Extract the first word of "perl", so it can be a program name with args. +set dummy perl; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_PERL+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $PERL in + [\\/]* | ?:[\\/]*) + ac_cv_path_PERL="$PERL" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PERL="$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 + + test -z "$ac_cv_path_PERL" && ac_cv_path_PERL="notfound" + ;; +esac +fi +PERL=$ac_cv_path_PERL +if test -n "$PERL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5 +$as_echo "$PERL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + if test "X$PERL" = "Xnotfound"; then + as_fn_error $? "You have requested a build +of the documentation. For this to work, you must have perl installed. +Alternatively, you can disable building the documentation with +--disable-doc. +" "$LINENO" 5 + fi + + + # Extract the first word of "kpsewhich", so it can be a program name with args. +set dummy kpsewhich; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_KPSEWHICH+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $KPSEWHICH in + [\\/]* | ?:[\\/]*) + ac_cv_path_KPSEWHICH="$KPSEWHICH" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_KPSEWHICH="$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 + + test -z "$ac_cv_path_KPSEWHICH" && ac_cv_path_KPSEWHICH="no" + ;; +esac +fi +KPSEWHICH=$ac_cv_path_KPSEWHICH +if test -n "$KPSEWHICH"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $KPSEWHICH" >&5 +$as_echo "$KPSEWHICH" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + if test "X$KPSEWHICH" = "Xno"; then + as_fn_error $? "You have requested a build +of the documentation. For this to work, you must have a functional install of +TeX and LaTeX. kpsewhich is part of TeX. +Alternatively, you can disable building the documentation with +--disable-doc." "$LINENO" 5 + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking If your TeX installation contains epsf.tex" >&5 +$as_echo_n "checking If your TeX installation contains epsf.tex... " >&6; } + f=`$KPSEWHICH epsf.tex` + if test $? -eq 0 ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes ($f)" >&5 +$as_echo "yes ($f)" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + as_fn_error $? "You have requested a build +of the documentation. For this to work, you must have a functional install of +TeX and LaTeX that includes epsf.tex. On some linux distributions this is +part of the texlive-generic-recommended package. +Alternatively, you can disable building the documentation with +--disable-doc." "$LINENO" 5 + fi + +fi + +########################################################################## +# +# + +# FIXME: for now, only try to add -rdynamic if we're using gcc. We really +# need to figure out what the correct test is here. In the mean time, this +# should let things build with SunPRO again. +if test "x$GCC" = "xyes"; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking If the compiler accepts -rdynamic" >&5 +$as_echo_n "checking If the compiler accepts -rdynamic... " >&6; } +old_LDFLAGS="$LDFLAGS" +LDFLAGS="$LDFLAGS -rdynamic" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + LDFLAGS="$old_LDFLAGS" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + +# ------------- HID config ------------------- + +hid_guis="" +hid_printers="" +hid_exporters="" +hid_always="" + +for hid in `cd $srcdir/src/hid; echo *`; do + F=$srcdir/src/hid/$hid/hid.conf + if test -f $F + then + echo checking $F + . $F + case $type in + gui ) hid_guis="$hid_guis $hid" ;; + printer ) hid_printers="$hid_printers $hid" ;; + export ) hid_exporters="$hid_exporters $hid" ;; + always ) hid_always="$hid_always $hid" ;; + esac + fi +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which gui to use" >&5 +$as_echo_n "checking for which gui to use... " >&6; } + +# Check whether --with-gui was given. +if test "${with_gui+set}" = set; then : + withval=$with_gui; +else + with_gui=gtk + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_gui" >&5 +$as_echo "$with_gui" >&6; } +case " $hid_guis no none " in + *\ $with_gui\ * ) HIDLIST="$with_gui" ;; + * ) as_fn_error $? "$with_gui is not a valid gui" "$LINENO" 5 ;; +esac + +if test x"$with_gui" = x"none" -o x"$with_gui" = x"no" +then + HIDLIST= +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable toporouter" >&5 +$as_echo_n "checking whether to enable toporouter... " >&6; } +# Check whether --enable-toporouter was given. +if test "${enable_toporouter+set}" = set; then : + enableval=$enable_toporouter; +fi + +case "x$enable_toporouter" in #( + xyes | xno) : + ;; #( + *) : + enable_toporouter=yes + + ;; +esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_toporouter" >&5 +$as_echo "$enable_toporouter" >&6; } + if test $enable_toporouter != no; then + WITH_TOPOROUTER_TRUE= + WITH_TOPOROUTER_FALSE='#' +else + WITH_TOPOROUTER_TRUE='#' + WITH_TOPOROUTER_FALSE= +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable toporouter output" >&5 +$as_echo_n "checking whether to enable toporouter output... " >&6; } +# Check whether --enable-toporouter-output was given. +if test "${enable_toporouter_output+set}" = set; then : + enableval=$enable_toporouter_output; +fi + +case "z$enable_toporouter_output" in #( + zyes | zno) : + ;; #( + *) : + enable_toporouter_output=no + ;; +esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_toporouter_output" >&5 +$as_echo "$enable_toporouter_output" >&6; } +case $enable_toporouter_output in #( + yes) : + + topo_output_enabled=1 + ;; #( + *) : + + topo_output_enabled=0 + + ;; +esac + +cat >>confdefs.h <<_ACEOF +#define TOPO_OUTPUT_ENABLED $topo_output_enabled +_ACEOF + + + + + + + + +if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. +set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG +if test -n "$PKG_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_path_PKG_CONFIG"; then + ac_pt_PKG_CONFIG=$PKG_CONFIG + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $ac_pt_PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG +if test -n "$ac_pt_PKG_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 +$as_echo "$ac_pt_PKG_CONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_pt_PKG_CONFIG" = x; then + PKG_CONFIG="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + PKG_CONFIG=$ac_pt_PKG_CONFIG + fi +else + PKG_CONFIG="$ac_cv_path_PKG_CONFIG" +fi + +fi +if test -n "$PKG_CONFIG"; then + _pkg_min_version=0.9.0 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 +$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } + if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + PKG_CONFIG="" + fi +fi + +if test "x$enable_toporouter_output" = "xyes"; then + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAIRO" >&5 +$as_echo_n "checking for CAIRO... " >&6; } + +if test -n "$CAIRO_CFLAGS"; then + pkg_cv_CAIRO_CFLAGS="$CAIRO_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"cairo\""; } >&5 + ($PKG_CONFIG --exists --print-errors "cairo") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_CAIRO_CFLAGS=`$PKG_CONFIG --cflags "cairo" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$CAIRO_LIBS"; then + pkg_cv_CAIRO_LIBS="$CAIRO_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"cairo\""; } >&5 + ($PKG_CONFIG --exists --print-errors "cairo") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_CAIRO_LIBS=`$PKG_CONFIG --libs "cairo" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + CAIRO_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "cairo" 2>&1` + else + CAIRO_PKG_ERRORS=`$PKG_CONFIG --print-errors "cairo" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$CAIRO_PKG_ERRORS" >&5 + + as_fn_error $? "Cannot find cairo, needed by the toporouter +Please review the following errors: +$CAIRO_PKG_ERRORS" "$LINENO" 5 + +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + as_fn_error $? "Cannot find cairo, needed by the toporouter +Please review the following errors: +$CAIRO_PKG_ERRORS" "$LINENO" 5 + +else + CAIRO_CFLAGS=$pkg_cv_CAIRO_CFLAGS + CAIRO_LIBS=$pkg_cv_CAIRO_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +fi +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for whether to use DBUS" >&5 +$as_echo_n "checking for whether to use DBUS... " >&6; } +# Check whether --enable-dbus was given. +if test "${enable_dbus+set}" = set; then : + enableval=$enable_dbus; +else + + case " $with_gui " in + *\ gtk\ *) enable_dbus=yes ;; + *\ lesstif\ *) enable_dbus=yes ;; + * ) enable_dbus=no ;; + esac + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_dbus" >&5 +$as_echo "$enable_dbus" >&6; } + if test x$enable_dbus = xyes; then + WITH_DBUS_TRUE= + WITH_DBUS_FALSE='#' +else + WITH_DBUS_TRUE='#' + WITH_DBUS_FALSE= +fi + + +if test "x$enable_dbus" = "xyes"; then + case " $with_gui " in + *\ gtk\ *) ;; + *\ lesstif\ *) ;; + * ) as_fn_error $? "DBUS enabled but only works with a mainloop capable GUI HID. +Either do not use --enable-dbus or enable the gtk or lesstif GUI HID." "$LINENO" 5 + esac + + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DBUS" >&5 +$as_echo_n "checking for DBUS... " >&6; } + +if test -n "$DBUS_CFLAGS"; then + pkg_cv_DBUS_CFLAGS="$DBUS_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"dbus-1 >= 0.61\""; } >&5 + ($PKG_CONFIG --exists --print-errors "dbus-1 >= 0.61") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_DBUS_CFLAGS=`$PKG_CONFIG --cflags "dbus-1 >= 0.61" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$DBUS_LIBS"; then + pkg_cv_DBUS_LIBS="$DBUS_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"dbus-1 >= 0.61\""; } >&5 + ($PKG_CONFIG --exists --print-errors "dbus-1 >= 0.61") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_DBUS_LIBS=`$PKG_CONFIG --libs "dbus-1 >= 0.61" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + DBUS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "dbus-1 >= 0.61" 2>&1` + else + DBUS_PKG_ERRORS=`$PKG_CONFIG --print-errors "dbus-1 >= 0.61" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$DBUS_PKG_ERRORS" >&5 + + as_fn_error $? "Cannot find dbus-1 >= 0.61, install it and rerun ./configure +Please review the following errors: +$DBUS_PKG_ERRORS" "$LINENO" 5 + +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + as_fn_error $? "Cannot find dbus-1 >= 0.61, install it and rerun ./configure +Please review the following errors: +$DBUS_PKG_ERRORS" "$LINENO" 5 + +else + DBUS_CFLAGS=$pkg_cv_DBUS_CFLAGS + DBUS_LIBS=$pkg_cv_DBUS_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + saved_LIBS="$LIBS" + LIBS="$LIBS $DBUS_LIBS" + for ac_func in dbus_watch_get_unix_fd +do : + ac_fn_c_check_func "$LINENO" "dbus_watch_get_unix_fd" "ac_cv_func_dbus_watch_get_unix_fd" +if test "x$ac_cv_func_dbus_watch_get_unix_fd" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_DBUS_WATCH_GET_UNIX_FD 1 +_ACEOF + +fi +done + + LIBS="$saved_LIBS" +fi + DBUS_VERSION=`$PKG_CONFIG dbus-1 --modversion` + + +$as_echo "#define HAVE_DBUS 1" >>confdefs.h + + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for whether to use GL drawing" >&5 +$as_echo_n "checking for whether to use GL drawing... " >&6; } +# Check whether --enable-gl was given. +if test "${enable_gl+set}" = set; then : + enableval=$enable_gl; +else + + case " $with_gui " in + *\ gtk\ *) enable_gl=yes;; + * ) enable_gl=no;; + esac + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_gl" >&5 +$as_echo "$enable_gl" >&6; } + if test x$enable_gl = xyes; then + USE_GL_TRUE= + USE_GL_FALSE='#' +else + USE_GL_TRUE='#' + USE_GL_FALSE= +fi + + +if test "x$enable_gl" = "xyes"; then + case " $with_gui " in + *\ gtk\ *) ;; + * ) as_fn_error $? "GL drawing enabled but only works with the GTK HID. +Either do not use --enable-gl or enable the gtk HID." "$LINENO" 5 + ;; + esac + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 +$as_echo_n "checking for X... " >&6; } + + +# Check whether --with-x was given. +if test "${with_x+set}" = set; then : + withval=$with_x; +fi + +# $have_x is `yes', `no', `disabled', or empty when we do not yet know. +if test "x$with_x" = xno; then + # The user explicitly disabled X. + have_x=disabled +else + case $x_includes,$x_libraries in #( + *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #( + *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + # One or both of the vars are not set, and there is no cached value. +ac_x_includes=no ac_x_libraries=no +rm -f -r conftest.dir +if mkdir conftest.dir; then + cd conftest.dir + cat >Imakefile <<'_ACEOF' +incroot: + @echo incroot='${INCROOT}' +usrlibdir: + @echo usrlibdir='${USRLIBDIR}' +libdir: + @echo libdir='${LIBDIR}' +_ACEOF + if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then + # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. + for ac_var in incroot usrlibdir libdir; do + eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" + done + # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. + for ac_extension in a so sl dylib la dll; do + if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && + test -f "$ac_im_libdir/libX11.$ac_extension"; then + ac_im_usrlibdir=$ac_im_libdir; break + fi + done + # Screen out bogus values from the imake configuration. They are + # bogus both because they are the default anyway, and because + # using them would break gcc on systems where it needs fixed includes. + case $ac_im_incroot in + /usr/include) ac_x_includes= ;; + *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; + esac + case $ac_im_usrlibdir in + /usr/lib | /usr/lib64 | /lib | /lib64) ;; + *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; + esac + fi + cd .. + rm -f -r conftest.dir +fi + +# Standard set of common directories for X headers. +# Check X11 before X11Rn because it is often a symlink to the current release. +ac_x_header_dirs=' +/usr/X11/include +/usr/X11R7/include +/usr/X11R6/include +/usr/X11R5/include +/usr/X11R4/include + +/usr/include/X11 +/usr/include/X11R7 +/usr/include/X11R6 +/usr/include/X11R5 +/usr/include/X11R4 + +/usr/local/X11/include +/usr/local/X11R7/include +/usr/local/X11R6/include +/usr/local/X11R5/include +/usr/local/X11R4/include + +/usr/local/include/X11 +/usr/local/include/X11R7 +/usr/local/include/X11R6 +/usr/local/include/X11R5 +/usr/local/include/X11R4 + +/usr/X386/include +/usr/x386/include +/usr/XFree86/include/X11 + +/usr/include +/usr/local/include +/usr/unsupported/include +/usr/athena/include +/usr/local/x11r5/include +/usr/lpp/Xamples/include + +/usr/openwin/include +/usr/openwin/share/include' + +if test "$ac_x_includes" = no; then + # Guess where to find include files, by looking for Xlib.h. + # First, try using that file with no special directory specified. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # We can compile using X headers with no special include directory. +ac_x_includes= +else + for ac_dir in $ac_x_header_dirs; do + if test -r "$ac_dir/X11/Xlib.h"; then + ac_x_includes=$ac_dir + break + fi +done +fi +rm -f conftest.err conftest.$ac_ext +fi # $ac_x_includes = no + +if test "$ac_x_libraries" = no; then + # Check for the libraries. + # See if we find them without any special options. + # Don't add to $LIBS permanently. + ac_save_LIBS=$LIBS + LIBS="-lX11 $LIBS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +XrmInitialize () + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + LIBS=$ac_save_LIBS +# We can link X programs with no special library path. +ac_x_libraries= +else + LIBS=$ac_save_LIBS +for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` +do + # Don't even attempt the hair of trying to link an X program! + for ac_extension in a so sl dylib la dll; do + if test -r "$ac_dir/libX11.$ac_extension"; then + ac_x_libraries=$ac_dir + break 2 + fi + done +done +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi # $ac_x_libraries = no + +case $ac_x_includes,$ac_x_libraries in #( + no,* | *,no | *\'*) + # Didn't find X, or a directory has "'" in its name. + ac_cv_have_x="have_x=no";; #( + *) + # Record where we found X for the cache. + ac_cv_have_x="have_x=yes\ + ac_x_includes='$ac_x_includes'\ + ac_x_libraries='$ac_x_libraries'" +esac +fi +;; #( + *) have_x=yes;; + esac + eval "$ac_cv_have_x" +fi # $with_x != no + +if test "$have_x" != yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5 +$as_echo "$have_x" >&6; } + no_x=yes +else + # If each of the values was on the command line, it overrides each guess. + test "x$x_includes" = xNONE && x_includes=$ac_x_includes + test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries + # Update the cache value to reflect the command line values. + ac_cv_have_x="have_x=yes\ + ac_x_includes='$x_includes'\ + ac_x_libraries='$x_libraries'" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5 +$as_echo "libraries $x_libraries, headers $x_includes" >&6; } +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 +$as_echo_n "checking for a sed that does not truncate output... " >&6; } +if test "${ac_cv_path_SED+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ + for ac_i in 1 2 3 4 5 6 7; do + ac_script="$ac_script$as_nl$ac_script" + done + echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed + { ac_script=; unset ac_script;} + if test -z "$SED"; then + ac_path_SED_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue +# Check for GNU ac_path_SED and select it if it is found. + # Check for GNU $ac_path_SED +case `"$ac_path_SED" --version 2>&1` in +*GNU*) + ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo '' >> "conftest.nl" + "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_SED_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_SED="$ac_path_SED" + ac_path_SED_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_SED_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_SED"; then + as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 + fi +else + ac_cv_path_SED=$SED +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 +$as_echo "$ac_cv_path_SED" >&6; } + SED="$ac_cv_path_SED" + rm -f conftest.sed + + + + +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 + +ax_pthread_ok=no + +# We used to check for pthread.h first, but this fails if pthread.h +# requires special compiler flags (e.g. on True64 or Sequent). +# It gets checked for in the link test anyway. + +# First of all, check if the user has set any of the PTHREAD_LIBS, +# etcetera environment variables, and if threads linking works using +# them: +if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + save_LIBS="$LIBS" + LIBS="$PTHREAD_LIBS $LIBS" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5 +$as_echo_n "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; } + 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 pthread_join (); +int +main () +{ +return pthread_join (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ax_pthread_ok=yes +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5 +$as_echo "$ax_pthread_ok" >&6; } + if test x"$ax_pthread_ok" = xno; then + PTHREAD_LIBS="" + PTHREAD_CFLAGS="" + fi + LIBS="$save_LIBS" + CFLAGS="$save_CFLAGS" +fi + +# We must check for the threads library under a number of different +# names; the ordering is very important because some systems +# (e.g. DEC) have both -lpthread and -lpthreads, where one of the +# libraries is broken (non-POSIX). + +# Create a list of thread flags to try. Items starting with a "-" are +# C compiler flags, and other items are library names, except for "none" +# which indicates that we try without any flags at all, and "pthread-config" +# which is a program returning the flags for the Pth emulation library. + +ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" + +# The ordering *is* (sometimes) important. Some notes on the +# individual items follow: + +# pthreads: AIX (must check this before -lpthread) +# none: in case threads are in libc; should be tried before -Kthread and +# other compiler flags to prevent continual compiler warnings +# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) +# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) +# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) +# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads) +# -pthreads: Solaris/gcc +# -mthreads: Mingw32/gcc, Lynx/gcc +# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it +# doesn't hurt to check since this sometimes defines pthreads too; +# also defines -D_REENTRANT) +# ... -mt is also the pthreads flag for HP/aCC +# pthread: Linux, etcetera +# --thread-safe: KAI C++ +# pthread-config: use pthread-config program (for GNU Pth library) + +case "${host_cpu}-${host_os}" in + *solaris*) + + # On Solaris (at least, for some versions), libc contains stubbed + # (non-functional) versions of the pthreads routines, so link-based + # tests will erroneously succeed. (We need to link with -pthreads/-mt/ + # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather + # a function called by this macro, so we could check for that, but + # who knows whether they'll stub that too in a future libc.) So, + # we'll just look for -pthreads and -lpthread first: + + ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags" + ;; +esac + +if test x"$ax_pthread_ok" = xno; then +for flag in $ax_pthread_flags; do + + case $flag in + none) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5 +$as_echo_n "checking whether pthreads work without any flags... " >&6; } + ;; + + -*) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5 +$as_echo_n "checking whether pthreads work with $flag... " >&6; } + PTHREAD_CFLAGS="$flag" + ;; + + pthread-config) + # Extract the first word of "pthread-config", so it can be a program name with args. +set dummy pthread-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ax_pthread_config+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ax_pthread_config"; then + ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ax_pthread_config="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_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no" +fi +fi +ax_pthread_config=$ac_cv_prog_ax_pthread_config +if test -n "$ax_pthread_config"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5 +$as_echo "$ax_pthread_config" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + if test x"$ax_pthread_config" = xno; then continue; fi + PTHREAD_CFLAGS="`pthread-config --cflags`" + PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" + ;; + + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5 +$as_echo_n "checking for the pthreads library -l$flag... " >&6; } + PTHREAD_LIBS="-l$flag" + ;; + esac + + save_LIBS="$LIBS" + save_CFLAGS="$CFLAGS" + LIBS="$PTHREAD_LIBS $LIBS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + + # Check for various functions. We must include pthread.h, + # since some functions may be macros. (On the Sequent, we + # need a special flag -Kthread to make this header compile.) + # We check for pthread_join because it is in -lpthread on IRIX + # while pthread_create is in libc. We check for pthread_attr_init + # due to DEC craziness with -lpthreads. We check for + # pthread_cleanup_push because it is one of the few pthread + # functions on Solaris that doesn't have a non-functional libc stub. + # We try pthread_create on general principles. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + static void routine(void* a) {a=0;} + static void* start_routine(void* a) {return a;} +int +main () +{ +pthread_t th; pthread_attr_t attr; + pthread_join(th, 0); + pthread_attr_init(&attr); + pthread_cleanup_push(routine, 0); + pthread_create(&th,0,start_routine,0); + pthread_cleanup_pop(0); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ax_pthread_ok=yes +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + + LIBS="$save_LIBS" + CFLAGS="$save_CFLAGS" + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5 +$as_echo "$ax_pthread_ok" >&6; } + if test "x$ax_pthread_ok" = xyes; then + break; + fi + + PTHREAD_LIBS="" + PTHREAD_CFLAGS="" +done +fi + +# Various other checks: +if test "x$ax_pthread_ok" = xyes; then + save_LIBS="$LIBS" + LIBS="$PTHREAD_LIBS $LIBS" + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + + # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5 +$as_echo_n "checking for joinable pthread attribute... " >&6; } + attr_name=unknown + for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +int attr=$attr; return attr; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + attr_name=$attr; break +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + done + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $attr_name" >&5 +$as_echo "$attr_name" >&6; } + if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then + +cat >>confdefs.h <<_ACEOF +#define PTHREAD_CREATE_JOINABLE $attr_name +_ACEOF + + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5 +$as_echo_n "checking if more special flags are required for pthreads... " >&6; } + flag=no + case "${host_cpu}-${host_os}" in + *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";; + *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";; + esac + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${flag}" >&5 +$as_echo "${flag}" >&6; } + if test "x$flag" != xno; then + PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS" + fi + + LIBS="$save_LIBS" + CFLAGS="$save_CFLAGS" + + # More AIX lossage: must compile with xlc_r or cc_r + if test x"$GCC" != xyes; then + for ac_prog in xlc_r cc_r +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_PTHREAD_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$PTHREAD_CC"; then + ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_PTHREAD_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 +PTHREAD_CC=$ac_cv_prog_PTHREAD_CC +if test -n "$PTHREAD_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5 +$as_echo "$PTHREAD_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$PTHREAD_CC" && break +done +test -n "$PTHREAD_CC" || PTHREAD_CC="${CC}" + + else + PTHREAD_CC=$CC + fi +else + PTHREAD_CC="$CC" +fi + + + + + +# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: +if test x"$ax_pthread_ok" = xyes; then + +$as_echo "#define HAVE_PTHREAD 1" >>confdefs.h + + : +else + ax_pthread_ok=no + +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the Microsoft C compiler" >&5 +$as_echo_n "checking whether we are using the Microsoft C compiler... " >&6; } +if test "${ax_cv_c_compiler_ms+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +#ifndef _MSC_VER + choke me +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ax_compiler_ms=yes +else + ax_compiler_ms=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ax_cv_c_compiler_ms=$ax_compiler_ms + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_compiler_ms" >&5 +$as_echo "$ax_cv_c_compiler_ms" >&6; } +if test X$ax_compiler_ms = Xno; then : + GL_CFLAGS="${PTHREAD_CFLAGS}"; GL_LIBS="${PTHREAD_LIBS}" +fi + +# +# Use x_includes and x_libraries if they have been set (presumably by +# AC_PATH_X). +# +if test X$no_x != Xyes -a -n "$x_includes"; then : + GL_CFLAGS="-I$x_includes $GL_CFLAGS" +fi + +for ac_header in windows.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default" +if test "x$ac_cv_header_windows_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_WINDOWS_H 1 +_ACEOF + +fi + +done + + +ax_save_CPPFLAGS=$CPPFLAGS +CPPFLAGS="$GL_CFLAGS $CPPFLAGS" +for ac_header in GL/gl.h OpenGL/gl.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" " +# if defined(HAVE_WINDOWS_H) && defined(_WIN32) +# include +# endif + +" +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 + +CPPFLAGS=$ax_save_CPPFLAGS + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenGL library" >&5 +$as_echo_n "checking for OpenGL library... " >&6; } +if test "${ax_cv_check_gl_libgl+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ax_cv_check_gl_libgl=no +case $host_cpu in + x86_64) ax_check_gl_libdir=lib64 ;; + *) ax_check_gl_libdir=lib ;; +esac +ax_save_CPPFLAGS=$CPPFLAGS +CPPFLAGS="$CPPFLAGS $GL_CFLAGS" +ax_save_LDFLAGS=$LDFLAGS +if test X$no_x != Xyes -a -n "$x_libraries"; then : + LDFLAGS="$LDFLAGS -L$x_libraries" +fi +ax_save_LIBS=$LIBS +ax_check_libs="-lopengl32 -lGL" +for ax_lib in $ax_check_libs; do + if test X$ax_compiler_ms = Xyes; then : + ax_try_lib=`echo $ax_lib | $SED -e 's/^-l//' -e 's/$/.lib/'` +else + ax_try_lib=$ax_lib +fi + LDFLAGS="$ax_save_LDFLAGS $GL_LIBS" + LIBS="$ax_try_lib $ax_save_LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +# if defined(HAVE_WINDOWS_H) && defined(_WIN32) +# include +# endif +# ifdef HAVE_GL_GL_H +# include +# elif defined(HAVE_OPENGL_GL_H) +# include +# else +# error no gl.h +# endif +int +main () +{ +glBegin(0) + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ax_cv_check_gl_libgl=$ax_try_lib; break +else + ax_check_gl_nvidia_flags="-L/usr/$ax_check_gl_libdir/nvidia" + LDFLAGS="$ax_save_LDFLAGS $GL_LIBS $ax_check_gl_nvidia_flags" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +# if defined(HAVE_WINDOWS_H) && defined(_WIN32) +# include +# endif +# ifdef HAVE_GL_GL_H +# include +# elif defined(HAVE_OPENGL_GL_H) +# include +# else +# error no gl.h +# endif +int +main () +{ +glBegin(0) + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ax_cv_check_gl_libgl="$ax_check_gl_nvidia_flags $ax_try_lib"; break +else + ax_check_gl_dylib_flag='-dylib_file /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib' + LDFLAGS="$ax_save_LDFLAGS $GL_LIBS $ax_check_gl_dylib_flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +# if defined(HAVE_WINDOWS_H) && defined(_WIN32) +# include +# endif +# ifdef HAVE_GL_GL_H +# include +# elif defined(HAVE_OPENGL_GL_H) +# include +# else +# error no gl.h +# endif +int +main () +{ +glBegin(0) + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ax_cv_check_gl_libgl="$ax_check_gl_dylib_flag $ax_try_lib"; break +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +done + +# +# If no_x is "yes", we don't want to wind up using a libGL that is +# linked with X11. Test to see if the found libGL includes GLX +# functions. If it does and no_x is "yes", we want to reset +# ax_cv_check_gl_libgl back to "no". +# +# Note that LDFLAGS and LIBS should still have whatever values they +# had when we broke out of the test loop above; use that. +# +if test "X$ax_cv_check_gl_libgl" != Xno; then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +# if defined(HAVE_WINDOWS_H) && defined(_WIN32) +# include +# endif +# ifdef HAVE_GL_GL_H +# include +# elif defined(HAVE_OPENGL_GL_H) +# include +# else +# error no gl.h +# endif +int +main () +{ +glXQueryVersion(0, 0, 0) + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + if test X$no_x = Xyes; then : + ax_cv_check_gl_libgl=no +fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + +LIBS=$ax_save_LIBS +if test "X$ax_cv_check_gl_libgl" = Xno -a X$no_x = Xyes; then : + LDFLAGS="$ax_save_LDFLAGS -framework OpenGL" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +# if defined(HAVE_WINDOWS_H) && defined(_WIN32) +# include +# endif +# ifdef HAVE_GL_GL_H +# include +# elif defined(HAVE_OPENGL_GL_H) +# include +# else +# error no gl.h +# endif +int +main () +{ +glBegin(0) + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ax_cv_check_gl_libgl='-framework OpenGL' +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + +LDFLAGS=$ax_save_LDFLAGS +CPPFLAGS=$ax_save_CPPFLAGS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_gl_libgl" >&5 +$as_echo "$ax_cv_check_gl_libgl" >&6; } + +if test "X$ax_cv_check_gl_libgl" = Xno; then : + no_gl=yes; GL_CFLAGS=""; GL_LIBS="" +else + GL_LIBS="$ax_cv_check_gl_libgl $GL_LIBS" +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 X$no_gl = Xyes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "OpenGL is required. +See \`config.log' for more details" "$LINENO" 5; } +fi + + +GLU_CFLAGS=$GL_CFLAGS + +ax_save_CPPFLAGS=$CPPFLAGS +CPPFLAGS="$GL_CFLAGS $CPPFLAGS" +for ac_header in GL/glu.h OpenGL/glu.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" " +# if defined(HAVE_WINDOWS_H) && defined(_WIN32) +# include +# endif + +" +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 + +CPPFLAGS=$ax_save_CPPFLAGS + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenGL Utility library" >&5 +$as_echo_n "checking for OpenGL Utility library... " >&6; } +if test "${ax_cv_check_glu_libglu+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ax_cv_check_glu_libglu=no +ax_save_CPPFLAGS=$CPPFLAGS +CPPFLAGS="$GL_CFLAGS $CPPFLAGS" +ax_save_LDFLAGS=$LDFLAGS +ax_save_LIBS=$LIBS + +# +# First, check for the possibility that everything we need is already in +# GL_LIBS. +# +LDFLAGS="$ax_save_LDFLAGS $GL_LIBS" +# +# libGLU typically links with libstdc++ on POSIX platforms. +# However, setting the language to C++ means that test program +# source is named "conftest.cc"; and Microsoft cl doesn't know what +# to do with such a file. +# +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + +if test X$ax_compiler_ms = Xyes; then : + 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 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +# if defined(HAVE_WINDOWS_H) && defined(_WIN32) +# include +# endif +# ifdef HAVE_GL_GLU_H +# include +# elif defined(HAVE_OPENGL_GLU_H) +# include +# else +# error no glu.h +# endif +int +main () +{ +gluBeginCurve(0) + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ax_cv_check_glu_libglu=yes +else + LIBS="" + ax_check_libs="-lglu32 -lGLU" + for ax_lib in ${ax_check_libs}; do + if test X$ax_compiler_ms = Xyes; then : + ax_try_lib=`echo $ax_lib | $SED -e 's/^-l//' -e 's/$/.lib/'` +else + ax_try_lib=$ax_lib +fi + LIBS="$ax_try_lib $ax_save_LIBS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +# if defined(HAVE_WINDOWS_H) && defined(_WIN32) +# include +# endif +# ifdef HAVE_GL_GLU_H +# include +# elif defined(HAVE_OPENGL_GLU_H) +# include +# else +# error no glu.h +# endif +int +main () +{ +gluBeginCurve(0) + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ax_cv_check_glu_libglu=$ax_try_lib; break +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + done +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +if test X$ax_compiler_ms = Xyes; then : + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + +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 + + +LIBS=$ax_save_LIBS +LDFLAGS=$ax_save_LDFLAGS +CPPFLAGS=$ax_save_CPPFLAGS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_glu_libglu" >&5 +$as_echo "$ax_cv_check_glu_libglu" >&6; } +if test "X$ax_cv_check_glu_libglu" = Xno; then : + no_glu=yes; GLU_CFLAGS=""; GLU_LIBS="" +else + if test "X$ax_cv_check_glu_libglu" = Xyes; then : + GLU_LIBS="" +else + GLU_LIBS="$ax_cv_check_glu_libglu" +fi +fi + + + +# +# Some versions of Mac OS X include a broken interpretation of the GLU +# tesselation callback function signature when using the C++ compiler. +# +if test "X$ax_cv_check_glu_libglu" != Xno; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for varargs GLU tesselator callback function type" >&5 +$as_echo_n "checking for varargs GLU tesselator callback function type... " >&6; } +if test "${ax_cv_varargs_glu_tesscb+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + ax_cv_varargs_glu_tesscb=no + ax_save_CXXFLAGS=$CXXFLAGS + CXXFLAGS="$GL_CFLAGS $CXXFLAGS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +# ifdef HAVE_GL_GLU_H +# include +# else +# include +# endif +int +main () +{ +GLvoid (*func)(...); gluTessCallback(0, 0, func) + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + ax_cv_varargs_glu_tesscb=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_save_CXXFLAGS + 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: $ax_cv_varargs_glu_tesscb" >&5 +$as_echo "$ax_cv_varargs_glu_tesscb" >&6; } + if test X$ax_cv_varargs_glu_tesscb = Xyes; then : + +$as_echo "#define HAVE_VARARGS_GLU_TESSCB 1" >>confdefs.h + +fi +fi + + if test X$no_glu = Xyes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "The OpenGL GLU library is required. +See \`config.log' for more details" "$LINENO" 5; } +fi + + +$as_echo "#define ENABLE_GL 1" >>confdefs.h + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which printer to use" >&5 +$as_echo_n "checking for which printer to use... " >&6; } + +# Check whether --with-printer was given. +if test "${with_printer+set}" = set; then : + withval=$with_printer; +else + with_printer=lpr +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_printer" >&5 +$as_echo "$with_printer" >&6; } +case " $hid_printers " in + *\ $with_printer\ * ) + HIDLIST="$HIDLIST $with_printer" + ;; + * ) as_fn_error $? "$with_printer is not a valid printer" "$LINENO" 5 ;; +esac + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which exporters to use" >&5 +$as_echo_n "checking for which exporters to use... " >&6; } + +# Check whether --with-exporters was given. +if test "${with_exporters+set}" = set; then : + withval=$with_exporters; +else + with_exporters=$hid_exporters +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_exporters" >&5 +$as_echo "$with_exporters" >&6; } +for e in `echo $with_exporters | sed 's/,/ /g'`; do + case " $hid_exporters " in + *\ $e\ * ) + HIDLIST="$HIDLIST $e" + ;; + * ) as_fn_error $? "$e is not a valid exporter" "$LINENO" 5 ;; + esac +done + +if test "X$enable_jpeg" = "Xno" -a "X$enable_gif" = "Xno" -a "X$enable_png" = "Xno" ; then + case " ${HIDLIST} " in + *\ png\ *) + as_fn_error $? "you have requested the png HID but turned off all output +formats! If you do not want gif/jpeg/png output, use --with-exporters to list +which exporters you want and do not list png there." "$LINENO" 5 + ;; + + *) + ;; + esac +fi + +for hid in $HIDLIST; do + F=$srcdir/src/hid/$hid/hid.conf + if test -f $F ; then + echo checking $hid depedencies + deps= + . $F + for dep in $deps; do + if test "X`echo $HIDLIST | grep $dep`" = "X"; then + as_fn_error $? "you have requested the $hid HID but not the $dep HID, which it depends on" "$LINENO" 5 + fi + done + fi +done + +for e in $HIDLIST; do + HIDLIBS="$HIDLIBS lib$e.a" +done + + + + +# ------------- end HID config ------------------- + +###################################################################### +# +# desktop integration +# + +# Extract the first word of "env", so it can be a program name with args. +set dummy env; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_SETENV+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $SETENV in + [\\/]* | ?:[\\/]*) + ac_cv_path_SETENV="$SETENV" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_SETENV="$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 +SETENV=$ac_cv_path_SETENV +if test -n "$SETENV"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETENV" >&5 +$as_echo "$SETENV" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +# Extract the first word of "gtk-update-icon-path", so it can be a program name with args. +set dummy gtk-update-icon-path; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_GTK_UPDATE_ICON_CACHE_BIN+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $GTK_UPDATE_ICON_CACHE_BIN in + [\\/]* | ?:[\\/]*) + ac_cv_path_GTK_UPDATE_ICON_CACHE_BIN="$GTK_UPDATE_ICON_CACHE_BIN" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_GTK_UPDATE_ICON_CACHE_BIN="$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 + + test -z "$ac_cv_path_GTK_UPDATE_ICON_CACHE_BIN" && ac_cv_path_GTK_UPDATE_ICON_CACHE_BIN="true" + ;; +esac +fi +GTK_UPDATE_ICON_CACHE_BIN=$ac_cv_path_GTK_UPDATE_ICON_CACHE_BIN +if test -n "$GTK_UPDATE_ICON_CACHE_BIN"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_UPDATE_ICON_CACHE_BIN" >&5 +$as_echo "$GTK_UPDATE_ICON_CACHE_BIN" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + +# Change default location for XDG files (MIME and Icons) + +# Check whether --with-xdgdatadir was given. +if test "${with_xdgdatadir+set}" = set; then : + withval=$with_xdgdatadir; opt_xdgdatadir=$withval +fi + + +# Change default location for KDE data files (KDE MIME registrations) + +# Check whether --with-kdedatadir was given. +if test "${with_kdedatadir+set}" = set; then : + withval=$with_kdedatadir; opt_kdedatadir=$withval +fi + + +if test x$opt_xdgdatadir = x; then + # path was not specified with --with-xdgdatadir + XDGDATADIR='${datadir}' +else + # path WAS specified with --with-xdgdatadir + XDGDATADIR="$opt_xdgdatadir" +fi + + +if test x$opt_kdedatadir = x; then + # path was not specified with --with-kdedatadir + KDEDATADIR='${datadir}' +else + # path WAS specified with --with-kdedatadir + KDEDATADIR="$opt_kdedatadir" +fi + + +# Check whether --enable-update-desktop-database was given. +if test "${enable_update_desktop_database+set}" = set; then : + enableval=$enable_update_desktop_database; +else + enable_update_desktop_database=yes +fi + + + if test x$enable_update_desktop_database = xyes; then + ENABLE_UPDATE_DESKTOP_DATABASE_TRUE= + ENABLE_UPDATE_DESKTOP_DATABASE_FALSE='#' +else + ENABLE_UPDATE_DESKTOP_DATABASE_TRUE='#' + ENABLE_UPDATE_DESKTOP_DATABASE_FALSE= +fi + + +if test x$enable_update_desktop_database = xyes ; then + # Extract the first word of "update-desktop-database", so it can be a program name with args. +set dummy update-desktop-database; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_UPDATE_DESKTOP_DATABASE+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $UPDATE_DESKTOP_DATABASE in + [\\/]* | ?:[\\/]*) + ac_cv_path_UPDATE_DESKTOP_DATABASE="$UPDATE_DESKTOP_DATABASE" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_UPDATE_DESKTOP_DATABASE="$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 + + test -z "$ac_cv_path_UPDATE_DESKTOP_DATABASE" && ac_cv_path_UPDATE_DESKTOP_DATABASE="no" + ;; +esac +fi +UPDATE_DESKTOP_DATABASE=$ac_cv_path_UPDATE_DESKTOP_DATABASE +if test -n "$UPDATE_DESKTOP_DATABASE"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UPDATE_DESKTOP_DATABASE" >&5 +$as_echo "$UPDATE_DESKTOP_DATABASE" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + if test $UPDATE_DESKTOP_DATABASE = no; then + as_fn_error $? "Cannot find update-desktop-database, make sure it is installed and in your PATH, or configure with --disable-update-desktop-database" "$LINENO" 5 + fi +fi + +# Check whether --enable-update-mime-database was given. +if test "${enable_update_mime_database+set}" = set; then : + enableval=$enable_update_mime_database; +else + enable_update_mime_database=yes +fi + + + if test x$enable_update_mime_database = xyes; then + ENABLE_UPDATE_MIME_DATABASE_TRUE= + ENABLE_UPDATE_MIME_DATABASE_FALSE='#' +else + ENABLE_UPDATE_MIME_DATABASE_TRUE='#' + ENABLE_UPDATE_MIME_DATABASE_FALSE= +fi + + +if test x$enable_update_mime_database = xyes ; then + # Extract the first word of "update-mime-database", so it can be a program name with args. +set dummy update-mime-database; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_UPDATE_MIME_DATABASE+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $UPDATE_MIME_DATABASE in + [\\/]* | ?:[\\/]*) + ac_cv_path_UPDATE_MIME_DATABASE="$UPDATE_MIME_DATABASE" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_UPDATE_MIME_DATABASE="$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 + + test -z "$ac_cv_path_UPDATE_MIME_DATABASE" && ac_cv_path_UPDATE_MIME_DATABASE="no" + ;; +esac +fi +UPDATE_MIME_DATABASE=$ac_cv_path_UPDATE_MIME_DATABASE +if test -n "$UPDATE_MIME_DATABASE"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UPDATE_MIME_DATABASE" >&5 +$as_echo "$UPDATE_MIME_DATABASE" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + if test $UPDATE_MIME_DATABASE = no; then + as_fn_error $? "Cannot find update-mime-database, make sure it is installed and in your PATH, or configure with --disable-update-mime-database" "$LINENO" 5 + fi +fi + +# +###################################################################### + +for ac_prog in gm4 m4 +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_M4+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $M4 in + [\\/]* | ?:[\\/]*) + ac_cv_path_M4="$M4" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_M4="$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 +M4=$ac_cv_path_M4 +if test -n "$M4"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $M4" >&5 +$as_echo "$M4" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$M4" && break +done +test -n "$M4" || M4="none" + +if test "X$M4" = "Xnone" ; then + as_fn_error $? "Did not find a m4 executible. You need to make sure + that m4 is installed on your system and that m4 is in your path" "$LINENO" 5 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $M4 has the division involving negative numbers bug" >&5 +$as_echo_n "checking if $M4 has the division involving negative numbers bug... " >&6; } +pcb_m4_r=`echo "eval(-2/2)" | $M4` +if test "$pcb_m4_r" != "-1" ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + as_fn_error $? "It appears that $M4 has a bug involving division +with negative numbers. In particular it just returned the result that +-2/2 = $pcb_m4_r instead of -1. This is a known bug in GNU m4-1.4.9. Please +install a non-broken m4." "$LINENO" 5 +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +for ac_prog in wish wish85 wish8.5 wish83 wish8.3 wish80 wish8.0 cygwish83 cygwish80 +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_WISH+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $WISH in + [\\/]* | ?:[\\/]*) + ac_cv_path_WISH="$WISH" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_WISH="$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 +WISH=$ac_cv_path_WISH +if test -n "$WISH"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WISH" >&5 +$as_echo "$WISH" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$WISH" && break +done +test -n "$WISH" || WISH="none" + +if test "X$WISH" = "Xnone" ; then + as_fn_error $? "Did not find the wish executible. You need to make sure + that tcl is installed on your system and that wish is in your path" "$LINENO" 5 +fi + + +cat >>confdefs.h <<_ACEOF +#define M4 $M4 +_ACEOF + +GNUM4=$M4 + + +cat >>confdefs.h <<_ACEOF +#define GNUM4 "$M4" +_ACEOF + + +# Extract the first word of "pdflatex", so it can be a program name with args. +set dummy pdflatex; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_PDFLATEX+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $PDFLATEX in + [\\/]* | ?:[\\/]*) + ac_cv_path_PDFLATEX="$PDFLATEX" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PDFLATEX="$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 + + test -z "$ac_cv_path_PDFLATEX" && ac_cv_path_PDFLATEX="notfound" + ;; +esac +fi +PDFLATEX=$ac_cv_path_PDFLATEX +if test -n "$PDFLATEX"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PDFLATEX" >&5 +$as_echo "$PDFLATEX" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + if test x$PDFLATEX = xnotfound; then + MISSING_PDFLATEX_TRUE= + MISSING_PDFLATEX_FALSE='#' +else + MISSING_PDFLATEX_TRUE='#' + MISSING_PDFLATEX_FALSE= +fi + + +# Extract the first word of "texi2dvi", so it can be a program name with args. +set dummy texi2dvi; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_TEXI2DVI+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $TEXI2DVI in + [\\/]* | ?:[\\/]*) + ac_cv_path_TEXI2DVI="$TEXI2DVI" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_TEXI2DVI="$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 + + test -z "$ac_cv_path_TEXI2DVI" && ac_cv_path_TEXI2DVI="notfound" + ;; +esac +fi +TEXI2DVI=$ac_cv_path_TEXI2DVI +if test -n "$TEXI2DVI"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEXI2DVI" >&5 +$as_echo "$TEXI2DVI" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + if test x$TEXI2DVI = xnotfound; then + MISSING_TEXI2DVI_TRUE= + MISSING_TEXI2DVI_FALSE='#' +else + MISSING_TEXI2DVI_TRUE='#' + MISSING_TEXI2DVI_FALSE= +fi + + +# Extract the first word of "ps2pdf", so it can be a program name with args. +set dummy ps2pdf; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_PS2PDF+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $PS2PDF in + [\\/]* | ?:[\\/]*) + ac_cv_path_PS2PDF="$PS2PDF" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PS2PDF="$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 + + test -z "$ac_cv_path_PS2PDF" && ac_cv_path_PS2PDF="notfound" + ;; +esac +fi +PS2PDF=$ac_cv_path_PS2PDF +if test -n "$PS2PDF"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PS2PDF" >&5 +$as_echo "$PS2PDF" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + if test x$PS2PDF = xnotfound; then + MISSING_PS2PDF_TRUE= + MISSING_PS2PDF_FALSE='#' +else + MISSING_PS2PDF_TRUE='#' + MISSING_PS2PDF_FALSE= +fi + + +# used to build some of the getting started guide +# Extract the first word of "gschem", so it can be a program name with args. +set dummy gschem; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_GSCHEM+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $GSCHEM in + [\\/]* | ?:[\\/]*) + ac_cv_path_GSCHEM="$GSCHEM" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_GSCHEM="$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 + + test -z "$ac_cv_path_GSCHEM" && ac_cv_path_GSCHEM="notfound" + ;; +esac +fi +GSCHEM=$ac_cv_path_GSCHEM +if test -n "$GSCHEM"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GSCHEM" >&5 +$as_echo "$GSCHEM" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + if test x$GSCHEM = xnotfound; then + MISSING_GSCHEM_TRUE= + MISSING_GSCHEM_FALSE='#' +else + MISSING_GSCHEM_TRUE='#' + MISSING_GSCHEM_FALSE= +fi + + +if test "X$docs_yesno" = "Xyes" -a "X$pcb_git_version" = "Xyes" ; then + if test "$PDFLATEX" = "notfound" -o "$TEXI2DVI" = "notfound" -o "$PS2PDF" = "notfound" ; then + as_fn_error $? "It appears that you are building from a source tree obtained +via git but you do not have the required tools installed to build the documentation. Here +is a list of tools and the detected values: +PDFLATEX: $PDFLATEX +TEXI2DVI: $TEXI2DVI +PS2PDF: $PS2PDF +GSCHEM: $GSCHEM + +Either make sure these tools are installed or disable building and installing the documentation +by using the --disable-doc configure option. +" "$LINENO" 5 + fi +fi + +############################################################################ +# +# These checks are for tools used by the testsuite. It will not be fatal +# if these are missing because this is primarily for developer use. It is +# possible that we might add some --enable flag in the future that forces +# full tools for development work. + +# Check for ImageMagick tools used by the testsuite +# Extract the first word of "animate", so it can be a program name with args. +set dummy animate; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_IM_ANIMATE+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $IM_ANIMATE in + [\\/]* | ?:[\\/]*) + ac_cv_path_IM_ANIMATE="$IM_ANIMATE" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_IM_ANIMATE="$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 + + test -z "$ac_cv_path_IM_ANIMATE" && ac_cv_path_IM_ANIMATE="notfound" + ;; +esac +fi +IM_ANIMATE=$ac_cv_path_IM_ANIMATE +if test -n "$IM_ANIMATE"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $IM_ANIMATE" >&5 +$as_echo "$IM_ANIMATE" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +# Extract the first word of "compare", so it can be a program name with args. +set dummy compare; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_IM_COMPARE+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $IM_COMPARE in + [\\/]* | ?:[\\/]*) + ac_cv_path_IM_COMPARE="$IM_COMPARE" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_IM_COMPARE="$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 + + test -z "$ac_cv_path_IM_COMPARE" && ac_cv_path_IM_COMPARE="notfound" + ;; +esac +fi +IM_COMPARE=$ac_cv_path_IM_COMPARE +if test -n "$IM_COMPARE"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $IM_COMPARE" >&5 +$as_echo "$IM_COMPARE" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +# Extract the first word of "composite", so it can be a program name with args. +set dummy composite; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_IM_COMPOSITE+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $IM_COMPOSITE in + [\\/]* | ?:[\\/]*) + ac_cv_path_IM_COMPOSITE="$IM_COMPOSITE" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_IM_COMPOSITE="$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 + + test -z "$ac_cv_path_IM_COMPOSITE" && ac_cv_path_IM_COMPOSITE="notfound" + ;; +esac +fi +IM_COMPOSITE=$ac_cv_path_IM_COMPOSITE +if test -n "$IM_COMPOSITE"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $IM_COMPOSITE" >&5 +$as_echo "$IM_COMPOSITE" >&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 test "${ac_cv_path_IM_CONVERT+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $IM_CONVERT in + [\\/]* | ?:[\\/]*) + ac_cv_path_IM_CONVERT="$IM_CONVERT" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_IM_CONVERT="$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 + + test -z "$ac_cv_path_IM_CONVERT" && ac_cv_path_IM_CONVERT="notfound" + ;; +esac +fi +IM_CONVERT=$ac_cv_path_IM_CONVERT +if test -n "$IM_CONVERT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $IM_CONVERT" >&5 +$as_echo "$IM_CONVERT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +# Extract the first word of "display", so it can be a program name with args. +set dummy display; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_IM_DISPLAY+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $IM_DISPLAY in + [\\/]* | ?:[\\/]*) + ac_cv_path_IM_DISPLAY="$IM_DISPLAY" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_IM_DISPLAY="$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 + + test -z "$ac_cv_path_IM_DISPLAY" && ac_cv_path_IM_DISPLAY="notfound" + ;; +esac +fi +IM_DISPLAY=$ac_cv_path_IM_DISPLAY +if test -n "$IM_DISPLAY"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $IM_DISPLAY" >&5 +$as_echo "$IM_DISPLAY" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +# Extract the first word of "montage", so it can be a program name with args. +set dummy montage; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_IM_MONTAGE+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $IM_MONTAGE in + [\\/]* | ?:[\\/]*) + ac_cv_path_IM_MONTAGE="$IM_MONTAGE" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_IM_MONTAGE="$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 + + test -z "$ac_cv_path_IM_MONTAGE" && ac_cv_path_IM_MONTAGE="notfound" + ;; +esac +fi +IM_MONTAGE=$ac_cv_path_IM_MONTAGE +if test -n "$IM_MONTAGE"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $IM_MONTAGE" >&5 +$as_echo "$IM_MONTAGE" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +missing_magick="" +test "${IM_ANIMATE}" != "notfound" || missing_magick="${missing_magick} animate" +test "${IM_COMPARE}" != "notfound" || missing_magick="${missing_magick} compare" +test "${IM_COMPOSITE}" != "notfound" || missing_magick="${missing_magick} composite" +test "${IM_CONVERT}" != "notfound" || missing_magick="${missing_magick} convert" +test "${IM_DISPLAY}" != "notfound" || missing_magick="${missing_magick} display" +test "${IM_MONTAGE}" != "notfound" || missing_magick="${missing_magick} montage" + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if all ImageMagick tools needed for the testsuite were found" >&5 +$as_echo_n "checking if all ImageMagick tools needed for the testsuite were found... " >&6; } +if test "X${missing_magick}" != "X" ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no. The testsuite will be disabled because the following +tools from the ImageMagick suite were not found: +${missing_magick} +No loss in pcb functionality should be experienced, you just will not +be able to run the full regression testsuite. +" >&5 +$as_echo "no. The testsuite will be disabled because the following +tools from the ImageMagick suite were not found: +${missing_magick} +No loss in pcb functionality should be experienced, you just will not +be able to run the full regression testsuite. +" >&6; } + have_magick=no +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + have_magick=yes +fi + +have_test_tools=yes + +test $have_magick = yes || have_test_tools=no + +# the RS274-X export HID is partially checked by looking at the result with +# gerbv +# Extract the first word of "gerbv", so it can be a program name with args. +set dummy gerbv; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_GERBV+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $GERBV in + [\\/]* | ?:[\\/]*) + ac_cv_path_GERBV="$GERBV" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_GERBV="$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 + + test -z "$ac_cv_path_GERBV" && ac_cv_path_GERBV="notfound" + ;; +esac +fi +GERBV=$ac_cv_path_GERBV +if test -n "$GERBV"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GERBV" >&5 +$as_echo "$GERBV" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +test $GERBV != notfound || have_test_tools=no + + + if test x$have_test_tools = xyes; then + HAVE_TEST_TOOLS_TRUE= + HAVE_TEST_TOOLS_FALSE='#' +else + HAVE_TEST_TOOLS_TRUE='#' + HAVE_TEST_TOOLS_FALSE= +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if all the requried testsuite tools were found" >&5 +$as_echo_n "checking if all the requried testsuite tools were found... " >&6; } +if test x$have_test_tools = xyes ; 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 -- the testsuite will be disabled" >&5 +$as_echo "no -- the testsuite will be disabled" >&6; } +fi + + +# +############################################################################ + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5 +$as_echo_n "checking for sqrt in -lm... " >&6; } +if test "${ac_cv_lib_m_sqrt+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lm $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char sqrt (); +int +main () +{ +return sqrt (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_m_sqrt=yes +else + ac_cv_lib_m_sqrt=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_m_sqrt" >&5 +$as_echo "$ac_cv_lib_m_sqrt" >&6; } +if test "x$ac_cv_lib_m_sqrt" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBM 1 +_ACEOF + + LIBS="-lm $LIBS" + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if test "${ac_cv_lib_dl_dlopen+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dl_dlopen=yes +else + ac_cv_lib_dl_dlopen=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBDL 1 +_ACEOF + + LIBS="-ldl $LIBS" + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lxnet" >&5 +$as_echo_n "checking for gethostbyname in -lxnet... " >&6; } +if test "${ac_cv_lib_xnet_gethostbyname+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lxnet $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 gethostbyname (); +int +main () +{ +return gethostbyname (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_xnet_gethostbyname=yes +else + ac_cv_lib_xnet_gethostbyname=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_xnet_gethostbyname" >&5 +$as_echo "$ac_cv_lib_xnet_gethostbyname" >&6; } +if test "x$ac_cv_lib_xnet_gethostbyname" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBXNET 1 +_ACEOF + + LIBS="-lxnet $LIBS" + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for yywrap in -lfl" >&5 +$as_echo_n "checking for yywrap in -lfl... " >&6; } +if test "${ac_cv_lib_fl_yywrap+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lfl $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 yywrap (); +int +main () +{ +return yywrap (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_fl_yywrap=yes +else + ac_cv_lib_fl_yywrap=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_fl_yywrap" >&5 +$as_echo "$ac_cv_lib_fl_yywrap" >&6; } +if test "x$ac_cv_lib_fl_yywrap" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBFL 1 +_ACEOF + + LIBS="-lfl $LIBS" + +fi + +for ac_func in strerror +do : + ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror" +if test "x$ac_cv_func_strerror" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_STRERROR 1 +_ACEOF + +fi +done + +for ac_func in regcomp re_comp +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 + +for ac_func in logf expf rint +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 + +for ac_func in vsnprintf +do : + ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf" +if test "x$ac_cv_func_vsnprintf" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_VSNPRINTF 1 +_ACEOF + +fi +done + +for ac_func in getpwuid getcwd +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 + +for ac_func in rand random +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 + +for ac_func in stat +do : + ac_fn_c_check_func "$LINENO" "stat" "ac_cv_func_stat" +if test "x$ac_cv_func_stat" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_STAT 1 +_ACEOF + +fi +done + + +for ac_func in mkdtemp +do : + ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp" +if test "x$ac_cv_func_mkdtemp" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_MKDTEMP 1 +_ACEOF + +fi +done + + +# normally used for all file i/o +for ac_func in popen +do : + ac_fn_c_check_func "$LINENO" "popen" "ac_cv_func_popen" +if test "x$ac_cv_func_popen" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_POPEN 1 +_ACEOF + +fi +done + + +# for lrealpath.c +for ac_func in realpath canonicalize_file_name +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 + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether canonicalize_file_name must be declared" >&5 +$as_echo_n "checking whether canonicalize_file_name must be declared... " >&6; } +if test "${libiberty_cv_decl_needed_canonicalize_file_name+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "confdefs.h" +#include +#ifdef HAVE_STRING_H +#include +#else +#ifdef HAVE_STRINGS_H +#include +#endif +#endif +#ifdef HAVE_STDLIB_H +#include +#endif +#ifdef HAVE_UNISTD_H +#include +#endif +int +main () +{ +char *(*pfn) = (char *(*)) canonicalize_file_name + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + libiberty_cv_decl_needed_canonicalize_file_name=no +else + libiberty_cv_decl_needed_canonicalize_file_name=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libiberty_cv_decl_needed_canonicalize_file_name" >&5 +$as_echo "$libiberty_cv_decl_needed_canonicalize_file_name" >&6; } +if test $libiberty_cv_decl_needed_canonicalize_file_name = yes; then + +$as_echo "#define NEED_DECLARATION_CANONICALIZE_FILE_NAME 1" >>confdefs.h + +fi + + +# for pcb_spawnvp in action.c on Windows +for ac_func in _spawnvp +do : + ac_fn_c_check_func "$LINENO" "_spawnvp" "ac_cv_func__spawnvp" +if test "x$ac_cv_func__spawnvp" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE__SPAWNVP 1 +_ACEOF + +fi +done + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if test "${ac_cv_header_stdc+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdc=yes +else + ac_cv_header_stdc=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +else + ac_cv_header_stdc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +$as_echo "#define STDC_HEADERS 1" >>confdefs.h + +fi + +for ac_header in limits.h locale.h string.h sys/types.h regex.h pwd.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 + +for ac_header in sys/socket.h netinet/in.h netdb.h sys/param.h sys/times.h sys/wait.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 + +for ac_header in dlfcn.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default" +if test "x$ac_cv_header_dlfcn_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_DLFCN_H 1 +_ACEOF + +fi + +done + + +if test "x${WIN32}" = "xyes" ; then + for ac_header in windows.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default" +if test "x$ac_cv_header_windows_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_WINDOWS_H 1 +_ACEOF + +fi + +done + +fi +# Search for glib + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLIB" >&5 +$as_echo_n "checking for GLIB... " >&6; } + +if test -n "$GLIB_CFLAGS"; then + pkg_cv_GLIB_CFLAGS="$GLIB_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "glib-2.0") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_GLIB_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$GLIB_LIBS"; then + pkg_cv_GLIB_LIBS="$GLIB_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "glib-2.0") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_GLIB_LIBS=`$PKG_CONFIG --libs "glib-2.0" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + GLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "glib-2.0" 2>&1` + else + GLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors "glib-2.0" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$GLIB_PKG_ERRORS" >&5 + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Note: cannot find glib-2.0. +You may want to review the following errors: +$GLIB_PKG_ERRORS" >&5 +$as_echo "Note: cannot find glib-2.0. +You may want to review the following errors: +$GLIB_PKG_ERRORS" >&6; } + +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Note: cannot find glib-2.0. +You may want to review the following errors: +$GLIB_PKG_ERRORS" >&5 +$as_echo "Note: cannot find glib-2.0. +You may want to review the following errors: +$GLIB_PKG_ERRORS" >&6; } + +else + GLIB_CFLAGS=$pkg_cv_GLIB_CFLAGS + GLIB_LIBS=$pkg_cv_GLIB_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +fi + +for e in $HIDLIST; do + case $e in + lesstif ) + if test "$no_x" = yes; then + # Not all programs may use this symbol, but it does not hurt to define it. + +$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h + + X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS= +else + if test -n "$x_includes"; then + X_CFLAGS="$X_CFLAGS -I$x_includes" + fi + + # It would also be nice to do this for all -L options, not just this one. + if test -n "$x_libraries"; then + X_LIBS="$X_LIBS -L$x_libraries" + # For Solaris; some versions of Sun CC require a space after -R and + # others require no space. Words are not sufficient . . . . + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5 +$as_echo_n "checking whether -R must be followed by a space... " >&6; } + ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries" + ac_xsave_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + X_LIBS="$X_LIBS -R$x_libraries" +else + LIBS="$ac_xsave_LIBS -R $x_libraries" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + X_LIBS="$X_LIBS -R $x_libraries" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5 +$as_echo "neither works" >&6; } +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + ac_c_werror_flag=$ac_xsave_c_werror_flag + LIBS=$ac_xsave_LIBS + fi + + # Check for system-dependent libraries X programs must link with. + # Do this before checking for the system-independent R6 libraries + # (-lICE), since we may need -lsocket or whatever for X linking. + + if test "$ISC" = yes; then + X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet" + else + # Martyn Johnson says this is needed for Ultrix, if the X + # libraries were built with DECnet support. And Karl Berry says + # the Alpha needs dnet_stub (dnet does not exist). + ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11" + 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 XOpenDisplay (); +int +main () +{ +return XOpenDisplay (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5 +$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; } +if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldnet $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 dnet_ntoa (); +int +main () +{ +return dnet_ntoa (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dnet_dnet_ntoa=yes +else + ac_cv_lib_dnet_dnet_ntoa=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_dnet_dnet_ntoa" >&5 +$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; } +if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then : + X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" +fi + + if test $ac_cv_lib_dnet_dnet_ntoa = no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5 +$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; } +if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldnet_stub $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 dnet_ntoa (); +int +main () +{ +return dnet_ntoa (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dnet_stub_dnet_ntoa=yes +else + ac_cv_lib_dnet_stub_dnet_ntoa=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_dnet_stub_dnet_ntoa" >&5 +$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; } +if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then : + X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" +fi + + fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$ac_xsave_LIBS" + + # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT, + # to get the SysV transport functions. + # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4) + # needs -lnsl. + # The nsl library prevents programs from opening the X display + # on Irix 5.2, according to T.E. Dickey. + # The functions gethostbyname, getservbyname, and inet_addr are + # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking. + ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname" +if test "x$ac_cv_func_gethostbyname" = x""yes; then : + +fi + + if test $ac_cv_func_gethostbyname = no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5 +$as_echo_n "checking for gethostbyname in -lnsl... " >&6; } +if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lnsl $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 gethostbyname (); +int +main () +{ +return gethostbyname (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_nsl_gethostbyname=yes +else + ac_cv_lib_nsl_gethostbyname=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_nsl_gethostbyname" >&5 +$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; } +if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then : + X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" +fi + + if test $ac_cv_lib_nsl_gethostbyname = no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5 +$as_echo_n "checking for gethostbyname in -lbsd... " >&6; } +if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lbsd $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 gethostbyname (); +int +main () +{ +return gethostbyname (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_bsd_gethostbyname=yes +else + ac_cv_lib_bsd_gethostbyname=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_bsd_gethostbyname" >&5 +$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; } +if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then : + X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd" +fi + + fi + fi + + # lieder@skyler.mavd.honeywell.com says without -lsocket, + # socket/setsockopt and other routines are undefined under SCO ODT + # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary + # on later versions), says Simon Leinen: it contains gethostby* + # variants that don't use the name server (or something). -lsocket + # must be given before -lnsl if both are needed. We assume that + # if connect needs -lnsl, so does gethostbyname. + ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect" +if test "x$ac_cv_func_connect" = x""yes; then : + +fi + + if test $ac_cv_func_connect = no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5 +$as_echo_n "checking for connect in -lsocket... " >&6; } +if test "${ac_cv_lib_socket_connect+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsocket $X_EXTRA_LIBS $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char connect (); +int +main () +{ +return connect (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_socket_connect=yes +else + ac_cv_lib_socket_connect=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_socket_connect" >&5 +$as_echo "$ac_cv_lib_socket_connect" >&6; } +if test "x$ac_cv_lib_socket_connect" = x""yes; then : + X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" +fi + + fi + + # Guillermo Gomez says -lposix is necessary on A/UX. + ac_fn_c_check_func "$LINENO" "remove" "ac_cv_func_remove" +if test "x$ac_cv_func_remove" = x""yes; then : + +fi + + if test $ac_cv_func_remove = no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5 +$as_echo_n "checking for remove in -lposix... " >&6; } +if test "${ac_cv_lib_posix_remove+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lposix $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 remove (); +int +main () +{ +return remove (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_posix_remove=yes +else + ac_cv_lib_posix_remove=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_posix_remove" >&5 +$as_echo "$ac_cv_lib_posix_remove" >&6; } +if test "x$ac_cv_lib_posix_remove" = x""yes; then : + X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" +fi + + fi + + # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. + ac_fn_c_check_func "$LINENO" "shmat" "ac_cv_func_shmat" +if test "x$ac_cv_func_shmat" = x""yes; then : + +fi + + if test $ac_cv_func_shmat = no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5 +$as_echo_n "checking for shmat in -lipc... " >&6; } +if test "${ac_cv_lib_ipc_shmat+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lipc $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 shmat (); +int +main () +{ +return shmat (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_ipc_shmat=yes +else + ac_cv_lib_ipc_shmat=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_ipc_shmat" >&5 +$as_echo "$ac_cv_lib_ipc_shmat" >&6; } +if test "x$ac_cv_lib_ipc_shmat" = x""yes; then : + X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" +fi + + fi + fi + + # Check for libraries that X11R6 Xt/Xaw programs need. + ac_save_LDFLAGS=$LDFLAGS + test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries" + # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to + # check for ICE first), but we must link in the order -lSM -lICE or + # we get undefined symbols. So assume we have SM if we have ICE. + # These have to be linked with before -lX11, unlike the other + # libraries we check for below, so use a different variable. + # John Interrante, Karl Berry + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5 +$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; } +if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lICE $X_EXTRA_LIBS $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char IceConnectionNumber (); +int +main () +{ +return IceConnectionNumber (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_ICE_IceConnectionNumber=yes +else + ac_cv_lib_ICE_IceConnectionNumber=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_ICE_IceConnectionNumber" >&5 +$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; } +if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then : + X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" +fi + + LDFLAGS=$ac_save_LDFLAGS + +fi + + CPPFLAGS="$CFLAGS $X_CFLAGS" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XOpenDisplay in -lX11" >&5 +$as_echo_n "checking for XOpenDisplay in -lX11... " >&6; } +if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lX11 $X_LIBS $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char XOpenDisplay (); +int +main () +{ +return XOpenDisplay (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_X11_XOpenDisplay=yes +else + ac_cv_lib_X11_XOpenDisplay=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_X11_XOpenDisplay" >&5 +$as_echo "$ac_cv_lib_X11_XOpenDisplay" >&6; } +if test "x$ac_cv_lib_X11_XOpenDisplay" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBX11 1 +_ACEOF + + LIBS="-lX11 $LIBS" + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lICE" >&5 +$as_echo_n "checking for main in -lICE... " >&6; } +if test "${ac_cv_lib_ICE_main+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lICE $X_LIBS $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +int +main () +{ +return main (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_ICE_main=yes +else + ac_cv_lib_ICE_main=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_ICE_main" >&5 +$as_echo "$ac_cv_lib_ICE_main" >&6; } +if test "x$ac_cv_lib_ICE_main" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBICE 1 +_ACEOF + + LIBS="-lICE $LIBS" + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lSM" >&5 +$as_echo_n "checking for main in -lSM... " >&6; } +if test "${ac_cv_lib_SM_main+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lSM $X_LIBS $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +int +main () +{ +return main (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_SM_main=yes +else + ac_cv_lib_SM_main=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_SM_main" >&5 +$as_echo "$ac_cv_lib_SM_main" >&6; } +if test "x$ac_cv_lib_SM_main" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBSM 1 +_ACEOF + + LIBS="-lSM $LIBS" + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lXext" >&5 +$as_echo_n "checking for main in -lXext... " >&6; } +if test "${ac_cv_lib_Xext_main+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lXext $X_LIBS $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +int +main () +{ +return main (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_Xext_main=yes +else + ac_cv_lib_Xext_main=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_Xext_main" >&5 +$as_echo "$ac_cv_lib_Xext_main" >&6; } +if test "x$ac_cv_lib_Xext_main" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBXEXT 1 +_ACEOF + + LIBS="-lXext $LIBS" + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XtOpenDisplay in -lXt" >&5 +$as_echo_n "checking for XtOpenDisplay in -lXt... " >&6; } +if test "${ac_cv_lib_Xt_XtOpenDisplay+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lXt $X_LIBS $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char XtOpenDisplay (); +int +main () +{ +return XtOpenDisplay (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_Xt_XtOpenDisplay=yes +else + ac_cv_lib_Xt_XtOpenDisplay=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_Xt_XtOpenDisplay" >&5 +$as_echo "$ac_cv_lib_Xt_XtOpenDisplay" >&6; } +if test "x$ac_cv_lib_Xt_XtOpenDisplay" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBXT 1 +_ACEOF + + LIBS="-lXt $LIBS" + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lXmu" >&5 +$as_echo_n "checking for main in -lXmu... " >&6; } +if test "${ac_cv_lib_Xmu_main+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lXmu $X_LIBS $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +int +main () +{ +return main (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_Xmu_main=yes +else + ac_cv_lib_Xmu_main=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_Xmu_main" >&5 +$as_echo "$ac_cv_lib_Xmu_main" >&6; } +if test "x$ac_cv_lib_Xmu_main" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBXMU 1 +_ACEOF + + LIBS="-lXmu $LIBS" + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lXpm" >&5 +$as_echo_n "checking for main in -lXpm... " >&6; } +if test "${ac_cv_lib_Xpm_main+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lXpm $X_LIBS $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +int +main () +{ +return main (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_Xpm_main=yes +else + ac_cv_lib_Xpm_main=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_Xpm_main" >&5 +$as_echo "$ac_cv_lib_Xpm_main" >&6; } +if test "x$ac_cv_lib_Xpm_main" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBXPM 1 +_ACEOF + + LIBS="-lXpm $LIBS" + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XmCreateMainWindow in -lXm" >&5 +$as_echo_n "checking for XmCreateMainWindow in -lXm... " >&6; } +if test "${ac_cv_lib_Xm_XmCreateMainWindow+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lXm $X_LIBS $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char XmCreateMainWindow (); +int +main () +{ +return XmCreateMainWindow (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_Xm_XmCreateMainWindow=yes +else + ac_cv_lib_Xm_XmCreateMainWindow=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_Xm_XmCreateMainWindow" >&5 +$as_echo "$ac_cv_lib_Xm_XmCreateMainWindow" >&6; } +if test "x$ac_cv_lib_Xm_XmCreateMainWindow" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBXM 1 +_ACEOF + + LIBS="-lXm $LIBS" + +fi + + case $ac_cv_lib_Xm_XmCreateMainWindow in + no ) + as_fn_error $? "You don't seem to have the Lesstif development environment installed." "$LINENO" 5 + ;; + * ) ;; + esac + for ac_header in Xm/Xm.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "Xm/Xm.h" "ac_cv_header_Xm_Xm_h" "$ac_includes_default" +if test "x$ac_cv_header_Xm_Xm_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_XM_XM_H 1 +_ACEOF + +fi + +done + + case $ac_cv_header_Xm_Xm_h in + no ) + as_fn_error $? "You don't seem to have the Lesstif development environment installed." "$LINENO" 5 + ;; + * ) ;; + esac + ;; + + gtk ) + # Check for pkg-config + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" + ;; +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 + + + if test "$PKG_CONFIG" = "no"; then + as_fn_error $? "Cannot find pkg-config, make sure it is installed and in your PATH" "$LINENO" 5 + fi + + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTK" >&5 +$as_echo_n "checking for GTK... " >&6; } + +if test -n "$GTK_CFLAGS"; then + pkg_cv_GTK_CFLAGS="$GTK_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+-2.0 >= 2.18.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "gtk+-2.0 >= 2.18.0") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_GTK_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0 >= 2.18.0" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$GTK_LIBS"; then + pkg_cv_GTK_LIBS="$GTK_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+-2.0 >= 2.18.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "gtk+-2.0 >= 2.18.0") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_GTK_LIBS=`$PKG_CONFIG --libs "gtk+-2.0 >= 2.18.0" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + GTK_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "gtk+-2.0 >= 2.18.0" 2>&1` + else + GTK_PKG_ERRORS=`$PKG_CONFIG --print-errors "gtk+-2.0 >= 2.18.0" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$GTK_PKG_ERRORS" >&5 + + as_fn_error $? "Cannot find gtk+ >= 2.18.0, install it and rerun ./configure +Please review the following errors: +$GTK_PKG_ERRORS" "$LINENO" 5 + +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + as_fn_error $? "Cannot find gtk+ >= 2.18.0, install it and rerun ./configure +Please review the following errors: +$GTK_PKG_ERRORS" "$LINENO" 5 + +else + GTK_CFLAGS=$pkg_cv_GTK_CFLAGS + GTK_LIBS=$pkg_cv_GTK_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +fi + GTK_VERSION=`$PKG_CONFIG gtk+-2.0 --modversion` + GLIB_VERSION=`$PKG_CONFIG glib-2.0 --modversion` + + if test "x$enable_gl" = "xyes"; then + # Check for GtkGLExt + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTKGLEXT" >&5 +$as_echo_n "checking for GTKGLEXT... " >&6; } + +if test -n "$GTKGLEXT_CFLAGS"; then + pkg_cv_GTKGLEXT_CFLAGS="$GTKGLEXT_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtkglext-1.0 >= 1.0.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "gtkglext-1.0 >= 1.0.0") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_GTKGLEXT_CFLAGS=`$PKG_CONFIG --cflags "gtkglext-1.0 >= 1.0.0" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$GTKGLEXT_LIBS"; then + pkg_cv_GTKGLEXT_LIBS="$GTKGLEXT_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtkglext-1.0 >= 1.0.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "gtkglext-1.0 >= 1.0.0") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_GTKGLEXT_LIBS=`$PKG_CONFIG --libs "gtkglext-1.0 >= 1.0.0" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + GTKGLEXT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "gtkglext-1.0 >= 1.0.0" 2>&1` + else + GTKGLEXT_PKG_ERRORS=`$PKG_CONFIG --print-errors "gtkglext-1.0 >= 1.0.0" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$GTKGLEXT_PKG_ERRORS" >&5 + + as_fn_error $? " +*** Required version of gtkglext is not installed - please install first *** +Please review the following errors: +$GTKGLEXT_PKG_ERRORS" "$LINENO" 5 + +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + as_fn_error $? " +*** Required version of gtkglext is not installed - please install first *** +Please review the following errors: +$GTKGLEXT_PKG_ERRORS" "$LINENO" 5 + +else + GTKGLEXT_CFLAGS=$pkg_cv_GTKGLEXT_CFLAGS + GTKGLEXT_LIBS=$pkg_cv_GTKGLEXT_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +fi + GTKGLEXT_VER=`$PKG_CONFIG gtkglext-1.0 --modversion` + fi + + ;; + + gcode|nelma|png ) + # Check for gdlib-config for gd (www.boutell.com/gd) + # Extract the first word of "gdlib-config", so it can be a program name with args. +set dummy gdlib-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_GDLIB_CONFIG+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $GDLIB_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_GDLIB_CONFIG="$GDLIB_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_GDLIB_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 + + test -z "$ac_cv_path_GDLIB_CONFIG" && ac_cv_path_GDLIB_CONFIG="no" + ;; +esac +fi +GDLIB_CONFIG=$ac_cv_path_GDLIB_CONFIG +if test -n "$GDLIB_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GDLIB_CONFIG" >&5 +$as_echo "$GDLIB_CONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + if test "$GDLIB_CONFIG" = "no"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Cannot find gdlib-config. +Make sure it is installed and in your PATH. +gdlib-config is part of the GD library available from www.boutell.com/gd. +This is needed for the png HID. I will look for libgd anyway and maybe +you will get lucky. +" >&5 +$as_echo "Cannot find gdlib-config. +Make sure it is installed and in your PATH. +gdlib-config is part of the GD library available from www.boutell.com/gd. +This is needed for the png HID. I will look for libgd anyway and maybe +you will get lucky. +" >&6; } + if test "$WIN32" != "yes" ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lgd" >&5 +$as_echo_n "checking for main in -lgd... " >&6; } +if test "${ac_cv_lib_gd_main+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lgd $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +int +main () +{ +return main (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_gd_main=yes +else + ac_cv_lib_gd_main=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_gd_main" >&5 +$as_echo "$ac_cv_lib_gd_main" >&6; } +if test "x$ac_cv_lib_gd_main" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBGD 1 +_ACEOF + + LIBS="-lgd $LIBS" + +else + as_fn_error $? "You have requested gcode, nelma, or png HIDs but -lgd could not be found" "$LINENO" 5 +fi + + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lbgd" >&5 +$as_echo_n "checking for main in -lbgd... " >&6; } +if test "${ac_cv_lib_bgd_main+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lbgd $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +int +main () +{ +return main (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_bgd_main=yes +else + ac_cv_lib_bgd_main=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_bgd_main" >&5 +$as_echo "$ac_cv_lib_bgd_main" >&6; } +if test "x$ac_cv_lib_bgd_main" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBBGD 1 +_ACEOF + + LIBS="-lbgd $LIBS" + +else + as_fn_error $? "You have requested gcode, nelma, or png HIDs but -lbgd could not be found" "$LINENO" 5 +fi + + fi + else + if test "$WIN32" = "yes" ; then + GD=bgd + else + GD=gd + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libgd cflags" >&5 +$as_echo_n "checking for libgd cflags... " >&6; } + GD_CFLAGS="`$GDLIB_CONFIG --cflags`" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GD_CFLAGS" >&5 +$as_echo "$GD_CFLAGS" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libgd libs" >&5 +$as_echo_n "checking for libgd libs... " >&6; } + GD_LIBS="`$GDLIB_CONFIG --ldflags` `$GDLIB_CONFIG --libs` -l${GD}" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GD_LIBS" >&5 +$as_echo "$GD_LIBS" >&6; } + fi + + # since some linux systems evidently install gdlib-config but fail to + # install the headers (nice), check for the header too and fail if it + # is not there. + CFLAGS="$CFLAGS $GD_CFLAGS" + CPPFLAGS="$CPPFLAGS $GD_CFLAGS" + for ac_header in gd.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "gd.h" "ac_cv_header_gd_h" "$ac_includes_default" +if test "x$ac_cv_header_gd_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_GD_H 1 +_ACEOF + +fi + +done + + case $ac_cv_header_gd_h in + no ) + as_fn_error $? " +You evidentally do not have a complete installation of the GD library available from www.boutell.com/gd. +This is needed for the nelma and/or png HID. +" "$LINENO" 5 + ;; + * ) ;; + esac + + # Some versions of gd (prior to the expiration of the + # patent related to gif compression) do not support + # gif output. Check for that here. + save_LIBS="$LIBS" + LIBS="$save_LIBS $GD_LIBS $X_LIBS" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if GIF output from the png HID is desired" >&5 +$as_echo_n "checking if GIF output from the png HID is desired... " >&6; } + # Check whether --enable-gif was given. +if test "${enable_gif+set}" = set; then : + enableval=$enable_gif; + if test "X$enable_gif" != "Xno" ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + with_gif=yes + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + with_gif=no + fi + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + with_gif=yes + +fi + + if test "X$with_gif" = "Xyes" ; then + for ac_func in gdImageGif +do : + ac_fn_c_check_func "$LINENO" "gdImageGif" "ac_cv_func_gdImageGif" +if test "x$ac_cv_func_gdImageGif" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_GDIMAGEGIF 1 +_ACEOF + +fi +done + + if test "$ac_cv_func_gdImageGif" != "yes"; then + as_fn_error $? "Your gd installation does not appear to include gif support. +You may need to update your installation of gd or disable +gif export with --disable-gif" "$LINENO" 5 + fi + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JPEG output from the png HID is desired" >&5 +$as_echo_n "checking if JPEG output from the png HID is desired... " >&6; } + # Check whether --enable-jpeg was given. +if test "${enable_jpeg+set}" = set; then : + enableval=$enable_jpeg; + if test "X$enable_jpeg" != "Xno" ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + with_jpeg=yes + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + with_jpeg=no + fi + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + with_jpeg=yes + +fi + + if test "X$with_jpeg" = "Xyes" ; then + for ac_func in gdImageJpeg +do : + ac_fn_c_check_func "$LINENO" "gdImageJpeg" "ac_cv_func_gdImageJpeg" +if test "x$ac_cv_func_gdImageJpeg" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_GDIMAGEJPEG 1 +_ACEOF + +fi +done + + if test "$ac_cv_func_gdImageJpeg" != "yes"; then + as_fn_error $? "Your gd installation does not appear to include JPEG support. +You may need to update your installation of gd or disable +JPEG export with --disable-jpeg" "$LINENO" 5 + fi + fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PNG output from the png HID is desired" >&5 +$as_echo_n "checking if PNG output from the png HID is desired... " >&6; } + # Check whether --enable-png was given. +if test "${enable_png+set}" = set; then : + enableval=$enable_png; + if test "X$enable_png" != "Xno" ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + with_png=yes + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + with_png=no + fi + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + with_png=yes + +fi + + if test "X$with_png" = "Xyes" ; then + for ac_func in gdImagePng +do : + ac_fn_c_check_func "$LINENO" "gdImagePng" "ac_cv_func_gdImagePng" +if test "x$ac_cv_func_gdImagePng" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_GDIMAGEPNG 1 +_ACEOF + +fi +done + + if test "$ac_cv_func_gdImagePng" != "yes"; then + as_fn_error $? "Your gd installation does not appear to include PNG support. +You may need to update your installation of gd or disable +PNG export with --disable-png" "$LINENO" 5 + fi + fi + LIBS="$save_LIBS" + ;; + + esac +done + + + if test x$with_png = xyes; then + PNG_TRUE= + PNG_FALSE='#' +else + PNG_TRUE='#' + PNG_FALSE= +fi + + if test x$with_gif = xyes; then + GIF_TRUE= + GIF_FALSE='#' +else + GIF_TRUE='#' + GIF_FALSE= +fi + + +# ------------- check if png previews should be built for pcblib-newlib +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the m4lib to newlib export should create png previews" >&5 +$as_echo_n "checking if the m4lib to newlib export should create png previews... " >&6; } +# Check whether --enable-m4lib-png was given. +if test "${enable_m4lib_png+set}" = set; then : + enableval=$enable_m4lib_png; +else + enable_m4lib_png=no +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_m4lib_png" >&5 +$as_echo "$enable_m4lib_png" >&6; } + if test x$enable_m4lib_png = xyes; then + PNG_PREVIEW_TRUE= + PNG_PREVIEW_FALSE='#' +else + PNG_PREVIEW_TRUE='#' + PNG_PREVIEW_FALSE= +fi + + + +# Run away.... more ugly stuff here. By default we don't actually build +# pcblib-newlib from pcblib unless we are building from cvs or git sources. +# The reason is it takes a while and requires the png HID. The problem is, +# what if someone wants to use --enable-m4lib-png but the tarball was built +# without the previews. Or, what if someone does not want the PNG previews +# but the person building the tarball included them. Ugh! So what the following +# code attempts to do is detect that mismatch situation. Note that we only +# want to kick this code in when *not* building from git or cvs sources. +build_pcblib_newlib=no +if test "$pcb_sources" = "tarball" ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking If pcblib-newlib was built with png previews" >&5 +$as_echo_n "checking If pcblib-newlib was built with png previews... " >&6; } + stamp=$srcdir/lib/pcblib-newlib.stamp + if test ! -f ${stamp} ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown, missing ${stamp}" >&5 +$as_echo "unknown, missing ${stamp}" >&6; } + build_pcblib_newlib=yes + else + if test "`cat ${stamp}`" = "png-preview=yes" ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + # lib exists and built with preview. + # if we don't want the preview, than rebuild + if test x$enable_m4lib_png != xyes ; then + build_pcblib_newlib=yes + fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + # lib exists and built without preview. + # if we want the preview, than rebuild + if test x$enable_m4lib_png = xyes ; then + build_pcblib_newlib=yes + fi + fi + fi +else + build_pcblib_newlib=yes +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking If pcblib-newlib needs to be rebuilt" >&5 +$as_echo_n "checking If pcblib-newlib needs to be rebuilt... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $build_pcblib_newlib" >&5 +$as_echo "$build_pcblib_newlib" >&6; } + if test x$build_pcblib_newlib = xyes; then + BUILD_PCBLIB_NEWLIB_TRUE= + BUILD_PCBLIB_NEWLIB_FALSE='#' +else + BUILD_PCBLIB_NEWLIB_TRUE='#' + BUILD_PCBLIB_NEWLIB_FALSE= +fi + + +if test "X$cross_compiling" = "Xyes" ; then + # we are cross compiling so we will need a build host binary for pcb + # Extract the first word of "pcb", so it can be a program name with args. +set dummy pcb; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_PCB+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $PCB in + [\\/]* | ?:[\\/]*) + ac_cv_path_PCB="$PCB" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PCB="$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 + + test -z "$ac_cv_path_PCB" && ac_cv_path_PCB="notfound" + ;; +esac +fi +PCB=$ac_cv_path_PCB +if test -n "$PCB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PCB" >&5 +$as_echo "$PCB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +else + PCB="\${top_builddir}/src/pcb" +fi + + +# now make see how essential it was that we have a pcb executable for the build +# host +if test "X$pcb_git_version" = "Xyes" ; then + if test "X$docs_yesno" = "Xyes" -o "X$enable_m4lib_png" = "Xyes" ; then + if test "$PCB" = "notfound" ; then + as_fn_error $? "You have selected a build with m4lib png +previews enabled and/or with building the documentation enabled but you also +appear to be cross-compiling. For this to work, you must have a pcb installed that +can run on this machine (the build machine) because it is needed for generating +library footprint png previews as well as some of the figures in the documentation. +If you wish to skip building the documentation and the footprint previews then add +--disable-doc --disable-m4lib-png +This will allow your cross build to work." "$LINENO" 5 + fi + fi +fi + +# ------------- Xrender ------------------- +have_xrender=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRenderQueryExtension in -lXrender" >&5 +$as_echo_n "checking for XRenderQueryExtension in -lXrender... " >&6; } +if test "${ac_cv_lib_Xrender_XRenderQueryExtension+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lXrender $X_LIBS $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char XRenderQueryExtension (); +int +main () +{ +return XRenderQueryExtension (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_Xrender_XRenderQueryExtension=yes +else + ac_cv_lib_Xrender_XRenderQueryExtension=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_Xrender_XRenderQueryExtension" >&5 +$as_echo "$ac_cv_lib_Xrender_XRenderQueryExtension" >&6; } +if test "x$ac_cv_lib_Xrender_XRenderQueryExtension" = x""yes; then : + have_xrender=yes +else + have_xrender=no +fi + + +# Check whether --enable-xrender was given. +if test "${enable_xrender+set}" = set; then : + enableval=$enable_xrender; +fi + +case "$have_xrender:$enable_xrender" in + no:* ) ;; + *:no ) ;; + * ) + X_LIBS="-lXrender $X_LIBS" + +$as_echo "#define HAVE_XRENDER 1" >>confdefs.h + + ;; +esac + +# ------------- Xinerama ------------------- +have_xinerama=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XineramaQueryExtension in -lXinerama" >&5 +$as_echo_n "checking for XineramaQueryExtension in -lXinerama... " >&6; } +if test "${ac_cv_lib_Xinerama_XineramaQueryExtension+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lXinerama $X_LIBS $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char XineramaQueryExtension (); +int +main () +{ +return XineramaQueryExtension (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_Xinerama_XineramaQueryExtension=yes +else + ac_cv_lib_Xinerama_XineramaQueryExtension=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_Xinerama_XineramaQueryExtension" >&5 +$as_echo "$ac_cv_lib_Xinerama_XineramaQueryExtension" >&6; } +if test "x$ac_cv_lib_Xinerama_XineramaQueryExtension" = x""yes; then : + have_xinerama=yes +else + have_xinerama=no +fi + + +# Check whether --enable-xinerama was given. +if test "${enable_xinerama+set}" = set; then : + enableval=$enable_xinerama; +fi + +case "$have_xinerama:$enable_xinerama" in + no:* ) ;; + *:no ) ;; + * ) + X_LIBS="-lXinerama $X_LIBS" + +$as_echo "#define HAVE_XINERAMA 1" >>confdefs.h + + ;; +esac + +# ------------- dmalloc ------------------- +with_dmalloc=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if dmalloc debugging should be enabled" >&5 +$as_echo_n "checking if dmalloc debugging should be enabled... " >&6; } +# Check whether --enable-dmalloc was given. +if test "${enable_dmalloc+set}" = set; then : + enableval=$enable_dmalloc; +if test "X$enable_dmalloc" != "Xno" ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + ac_fn_c_check_header_mongrel "$LINENO" "dmalloc.h" "ac_cv_header_dmalloc_h" "$ac_includes_default" +if test "x$ac_cv_header_dmalloc_h" = x""yes; then : + +else + as_fn_error $? "You have requested dmalloc debugging but dmalloc.h could not be found" "$LINENO" 5 +fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ldmalloc" >&5 +$as_echo_n "checking for main in -ldmalloc... " >&6; } +if test "${ac_cv_lib_dmalloc_main+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldmalloc $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +int +main () +{ +return main (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dmalloc_main=yes +else + ac_cv_lib_dmalloc_main=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_dmalloc_main" >&5 +$as_echo "$ac_cv_lib_dmalloc_main" >&6; } +if test "x$ac_cv_lib_dmalloc_main" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBDMALLOC 1 +_ACEOF + + LIBS="-ldmalloc $LIBS" + +else + as_fn_error $? "You have requested dmalloc debugging but -ldmalloc could not be found" "$LINENO" 5 +fi + + DMALLOC_LIBS="-ldmalloc" + with_dmalloc=yes +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + DMALLOC_LIBS="" +fi + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + DMALLOC_LIBS="" + +fi + + +# ------------- ElectricFence ------------------- +with_efence=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if ElectricFence debugging should be enabled" >&5 +$as_echo_n "checking if ElectricFence debugging should be enabled... " >&6; } +# Check whether --enable-efence was given. +if test "${enable_efence+set}" = set; then : + enableval=$enable_efence; +if test "X$enable_efence" != "Xno" ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lefence" >&5 +$as_echo_n "checking for main in -lefence... " >&6; } +if test "${ac_cv_lib_efence_main+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lefence $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +int +main () +{ +return main (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_efence_main=yes +else + ac_cv_lib_efence_main=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_efence_main" >&5 +$as_echo "$ac_cv_lib_efence_main" >&6; } +if test "x$ac_cv_lib_efence_main" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBEFENCE 1 +_ACEOF + + LIBS="-lefence $LIBS" + +else + as_fn_error $? "You have requested ElectricFence debugging but -lefence could not be found" "$LINENO" 5 +fi + + with_efence=yes +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + +else + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi + + +# ------------- Enable Debug code ------------------- +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for whether to enable debugging code" >&5 +$as_echo_n "checking for whether to enable debugging code... " >&6; } +# Check whether --enable-debug was given. +if test "${enable_debug+set}" = set; then : + enableval=$enable_debug; +else + enable_debug=no +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_debug" >&5 +$as_echo "$enable_debug" >&6; } + if test x$enable_debug = xyes; then + DEBUG_BUILD_TRUE= + DEBUG_BUILD_FALSE='#' +else + DEBUG_BUILD_TRUE='#' + DEBUG_BUILD_FALSE= +fi + + +# ------------- mkdir required for win32 compatibility ------------ +# WIN32 mkdir takes only one argument, POSIX takes two. +# #include "misc.h" where mkdir is required. +# =========================================================================== +# http://www.gnu.org/software/autoconf-archive/ax_func_mkdir.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_FUNC_MKDIR +# +# DESCRIPTION +# +# Check whether mkdir() is mkdir or _mkdir, and whether it takes one or +# two arguments. +# +# This macro can define HAVE_MKDIR, HAVE__MKDIR, and MKDIR_TAKES_ONE_ARG, +# which are expected to be used as follows: +# +# #if HAVE_MKDIR +# # if MKDIR_TAKES_ONE_ARG +# /* MinGW32 */ +# # define mkdir(a, b) mkdir(a) +# # endif +# #else +# # if HAVE__MKDIR +# /* plain Windows 32 */ +# # define mkdir(a, b) _mkdir(a) +# # else +# # error "Don't know how to create a directory on this system." +# # endif +# #endif +# +# LICENSE +# +# Copyright (c) 2008 Alexandre Duret-Lutz +# +# 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, see . +# +# As a special exception, the respective Autoconf Macro's copyright owner +# gives unlimited permission to copy, distribute and modify the configure +# scripts that are the output of Autoconf when processing the Macro. You +# need not follow the terms of the GNU General Public License when using +# or distributing such scripts, even though portions of the text of the +# Macro appear in them. The GNU General Public License (GPL) does govern +# all other use of the material that constitutes the Autoconf Macro. +# +# This special exception to the GPL applies to versions of the Autoconf +# Macro released by the Autoconf Archive. When you make and distribute a +# modified version of the Autoconf Macro, you may extend this special +# exception to the GPL to apply to your modified version as well. + +#serial 4 + +# 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. + + + + +for ac_func in mkdir _mkdir +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 + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir takes one argument" >&5 +$as_echo_n "checking whether mkdir takes one argument... " >&6; } +if test "${ac_cv_mkdir_takes_one_arg+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#if HAVE_UNISTD_H +# include +#endif + +int +main () +{ +mkdir ("."); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_mkdir_takes_one_arg=yes +else + ac_cv_mkdir_takes_one_arg=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mkdir_takes_one_arg" >&5 +$as_echo "$ac_cv_mkdir_takes_one_arg" >&6; } +if test x"$ac_cv_mkdir_takes_one_arg" = xyes; then + +$as_echo "#define MKDIR_TAKES_ONE_ARG 1" >>confdefs.h + +fi + + +# ------------- Type used for "Coord" type ------------------- + +for ac_header in stdint.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default" +if test "x$ac_cv_header_stdint_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_STDINT_H 1 +_ACEOF + +fi + +done + +# Check whether --enable-coord64 was given. +if test "${enable_coord64+set}" = set; then : + enableval=$enable_coord64; +else + enable_coord64=no +fi + +# Check whether --enable-coord32 was given. +if test "${enable_coord32+set}" = set; then : + enableval=$enable_coord32; +else + enable_coord32=no +fi + + +COORDTYPE="long" + +echo "$enable_coord32:$enable_coord64:$ac_cv_header_stdint_h" +case "$enable_coord32:$enable_coord64:$ac_cv_header_stdint_h" in + yes:no:yes ) + COORD_TYPE="int32_t" + COORD_MAX="INT32_MAX" + ;; + no:yes:yes ) + COORD_TYPE="int64_t" + COORD_MAX="INT64_MAX" + ;; + yes:no:no ) + COORD_TYPE="int" + COORD_MAX="INT_MAX" + ;; + no:yes:no ) + COORD_TYPE="long long" + COORD_MAX="LLONG_MAX" + ;; + yes:yes:* ) + as_fn_error $? "\"*** cannot require both 32 and 64 bit coordinates\"" "$LINENO" 5 + ;; + *:*:* ) + COORD_TYPE="long" + COORD_MAX="LONG_MAX" + ;; +esac + +cat >>confdefs.h <<_ACEOF +#define COORD_TYPE $COORD_TYPE +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define COORD_MAX $COORD_MAX +_ACEOF + + +# ------------- Complete set of CFLAGS and LIBS ------------------- + +CFLAGS="$CFLAGS $X_CFLAGS $DBUS_CFLAGS $GLIB_CFLAGS $GTK_CFLAGS $CAIRO_CFLAGS $GTKGLEXT_CFLAGS $GLU_CFLAGS $GL_CFLAGS" +LIBS="$LIBS $XM_LIBS $DBUS_LIBS $X_LIBS $GLIB_LIBS $GTK_LIBS $DMALLOC_LIBS $GD_LIBS $INTLLIBS $CAIRO_LIBS $GTKGLEXT_LIBS $GLU_LIBS $GL_LIBS" + + +# if we have gcc then add -Wall +if test "x$GCC" = "xyes"; then + # see about adding some extra checks if the compiler takes them + for flag in -Wall ; do + case " ${CFLAGS} " in + *\ ${flag}\ *) + # flag is already present + ;; + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the compiler accepts ${flag}" >&5 +$as_echo_n "checking if the compiler accepts ${flag}... " >&6; } + ac_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS ${flag}" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + CFLAGS="$ac_save_CFLAGS" + + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ;; + esac + done +fi + +CXXFLAGS="$CFLAGS" + +# Now add C-specific flags +if test "x$GCC" = "xyes"; then + # see about adding some extra checks if the compiler takes them + for flag in -Wdeclaration-after-statement ; do + case " ${CFLAGS} " in + *\ ${flag}\ *) + # flag is already present + ;; + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the compiler accepts ${flag}" >&5 +$as_echo_n "checking if the compiler accepts ${flag}... " >&6; } + ac_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS ${flag}" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + CFLAGS="$ac_save_CFLAGS" + + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ;; + esac + done +fi + +# See if we are building gcc with C++. +# Check whether --enable-build-with-cxx was given. +if test "${enable_build_with_cxx+set}" = set; then : + enableval=$enable_build_with_cxx; ENABLE_BUILD_WITH_CXX=$enableval +else + ENABLE_BUILD_WITH_CXX=no +fi + + +case "$ENABLE_BUILD_WITH_CXX" in + yes) + CC_OR_CXX="$CXX" + CC_OR_CXX_FLAGS="$CXXFLAGS" + ;; + no) + CC_OR_CXX="$CC" + CC_OR_CXX_FLAGS="$CFLAGS" + ;; +esac + + + +# font filename +FONTFILENAME=${FONTFILENAME:-"default_font"} + + +cat >>confdefs.h <<_ACEOF +#define FONTFILENAME "$FONTFILENAME" +_ACEOF + + +# standard autoconf variables +CPPFLAGS="$CPPFLAGS -DPREFIXDIR=\\\"\${prefix}\\\"" +CPPFLAGS="$CPPFLAGS -DBINDIR=\\\"\${bindir}\\\"" +CPPFLAGS="$CPPFLAGS -DHOST=\\\"\${host}\\\"" + +# directory for old-style library and for fonts +PCBLIBDIR=${datadir}/pcb + +#AC_DEFINE_UNQUOTED(PCBLIBDIR,"$PCBLIBDIR",[Library directory]) +CPPFLAGS="$CPPFLAGS -DPCBLIBDIR=\\\"$PCBLIBDIR\\\"" + +# name for old-style library +LIBRARYFILENAME=pcblib + + +cat >>confdefs.h <<_ACEOF +#define LIBRARYFILENAME "$LIBRARYFILENAME" +_ACEOF + + + +# directory for new library +PCBTREEDIR=${datadir}/pcb/newlib +PCBTREEPATH=${PCBTREEDIR}:${PCBLIBDIR}/pcblib-newlib +PCBTREEDIR=${PCBTREEDIR:-"$PCBTREEDIR"} + + +#AC_DEFINE_UNQUOTED(PCBTREEDIR,"$PCBLIB",[top directory for new style pcb library]) +CPPFLAGS="$CPPFLAGS -DPCBTREEDIR=\\\"$PCBTREEDIR\\\"" +CPPFLAGS="$CPPFLAGS -DPCBTREEPATH=\\\"$PCBTREEPATH\\\"" + +# Figure out relative paths +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the bindir to pcblibdir relative path" >&5 +$as_echo_n "checking for the bindir to pcblibdir relative path... " >&6; } +for _lcl_i in bindir:PCBLIBDIR:bindir_to_pcblibdir; do + _lcl_from=\$`echo "$_lcl_i" | sed 's,:.*$,,'` + _lcl_to=\$`echo "$_lcl_i" | sed 's,^[^:]*:,,' | sed 's,:[^:]*$,,'` + _lcl_result_var=`echo "$_lcl_i" | sed 's,^.*:,,'` + _lcl_receval="$_lcl_from" +_lcl_from=`(test "x$prefix" = xNONE && prefix="$ac_default_prefix" + test "x$exec_prefix" = xNONE && exec_prefix="${prefix}" + _lcl_receval_old='' + while test "$_lcl_receval_old" != "$_lcl_receval"; do + _lcl_receval_old="$_lcl_receval" + eval _lcl_receval="\"$_lcl_receval\"" + done + echo "$_lcl_receval")` + _lcl_receval="$_lcl_to" +_lcl_to=`(test "x$prefix" = xNONE && prefix="$ac_default_prefix" + test "x$exec_prefix" = xNONE && exec_prefix="${prefix}" + _lcl_receval_old='' + while test "$_lcl_receval_old" != "$_lcl_receval"; do + _lcl_receval_old="$_lcl_receval" + eval _lcl_receval="\"$_lcl_receval\"" + done + echo "$_lcl_receval")` + _lcl_notation="$_lcl_from$_lcl_to" + case ":$_lcl_from:" in +# change empty paths to '.' + ::) _lcl_from='.' ;; +# strip trailing slashes + :*[\\/]:) _lcl_from=`echo "$_lcl_from" | sed 's,[\\/]*$,,'` ;; + :*:) ;; +esac +# squeze repeated slashes +case '/' in +# if the path contains any backslashes, turn slashes into backslashes + *\\*) _lcl_from=`echo "$_lcl_from" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g'` ;; +# if the path contains slashes, also turn backslashes into slashes + *) _lcl_from=`echo "$_lcl_from" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;; +esac + case ":$_lcl_to:" in +# change empty paths to '.' + ::) _lcl_to='.' ;; +# strip trailing slashes + :*[\\/]:) _lcl_to=`echo "$_lcl_to" | sed 's,[\\/]*$,,'` ;; + :*:) ;; +esac +# squeze repeated slashes +case '/' in +# if the path contains any backslashes, turn slashes into backslashes + *\\*) _lcl_to=`echo "$_lcl_to" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g'` ;; +# if the path contains slashes, also turn backslashes into slashes + *) _lcl_to=`echo "$_lcl_to" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;; +esac + _lcl_common_prefix='' +_lcl_second_prefix_match='' +while test "$_lcl_second_prefix_match" != 0; do + _lcl_first_prefix=`expr "x$_lcl_from" : "x\($_lcl_common_prefix/*[^/]*\)"` + _lcl_second_prefix_match=`expr "x$_lcl_to" : "x$_lcl_first_prefix"` + if test "$_lcl_second_prefix_match" != 0; then + if test "$_lcl_first_prefix" != "$_lcl_common_prefix"; then + _lcl_common_prefix="$_lcl_first_prefix" + else + _lcl_second_prefix_match=0 + fi + fi +done +_lcl_first_suffix=`expr "x$_lcl_from" : "x$_lcl_common_prefix/*\(.*\)"` +_lcl_first_rel='' +_lcl_tmp='xxx' +while test "$_lcl_tmp" != ''; do + _lcl_tmp=`expr "x$_lcl_first_suffix" : "x[^/]*/*\(.*\)"` + if test "$_lcl_first_suffix" != ''; then + _lcl_first_suffix="$_lcl_tmp" + _lcl_first_rel="../$_lcl_first_rel" + fi +done +_lcl_second_suffix=`expr "x$_lcl_to" : "x$_lcl_common_prefix/*\(.*\)"` +_lcl_result_tmp="$_lcl_first_rel$_lcl_second_suffix" + case ":$_lcl_result_tmp:" in +# change empty paths to '.' + ::) _lcl_result_tmp='.' ;; +# strip trailing slashes + :*[\\/]:) _lcl_result_tmp=`echo "$_lcl_result_tmp" | sed 's,[\\/]*$,,'` ;; + :*:) ;; +esac +# squeze repeated slashes +case "$_lcl_notation" in +# if the path contains any backslashes, turn slashes into backslashes + *\\*) _lcl_result_tmp=`echo "$_lcl_result_tmp" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g'` ;; +# if the path contains slashes, also turn backslashes into slashes + *) _lcl_result_tmp=`echo "$_lcl_result_tmp" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;; +esac + eval $_lcl_result_var='$_lcl_result_tmp' +done +case ":$bindir_to_pcblibdir:" in +# change empty paths to '.' + ::) bindir_to_pcblibdir='.' ;; +# strip trailing slashes + :*[\\/]:) bindir_to_pcblibdir=`echo "$bindir_to_pcblibdir" | sed 's,[\\/]*$,,'` ;; + :*:) ;; +esac +# squeze repeated slashes +case $PCB_DIR_SEPARATOR_S in +# if the path contains any backslashes, turn slashes into backslashes + *\\*) bindir_to_pcblibdir=`echo "$bindir_to_pcblibdir" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g'` ;; +# if the path contains slashes, also turn backslashes into slashes + *) bindir_to_pcblibdir=`echo "$bindir_to_pcblibdir" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;; +esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bindir_to_pcblibdir" >&5 +$as_echo "$bindir_to_pcblibdir" >&6; } + +cat >>confdefs.h <<_ACEOF +#define BINDIR_TO_PCBLIBDIR "$bindir_to_pcblibdir" +_ACEOF + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the bindir to pcbtreedir relative path" >&5 +$as_echo_n "checking for the bindir to pcbtreedir relative path... " >&6; } +for _lcl_i in bindir:PCBTREEDIR:bindir_to_pcbtreedir; do + _lcl_from=\$`echo "$_lcl_i" | sed 's,:.*$,,'` + _lcl_to=\$`echo "$_lcl_i" | sed 's,^[^:]*:,,' | sed 's,:[^:]*$,,'` + _lcl_result_var=`echo "$_lcl_i" | sed 's,^.*:,,'` + _lcl_receval="$_lcl_from" +_lcl_from=`(test "x$prefix" = xNONE && prefix="$ac_default_prefix" + test "x$exec_prefix" = xNONE && exec_prefix="${prefix}" + _lcl_receval_old='' + while test "$_lcl_receval_old" != "$_lcl_receval"; do + _lcl_receval_old="$_lcl_receval" + eval _lcl_receval="\"$_lcl_receval\"" + done + echo "$_lcl_receval")` + _lcl_receval="$_lcl_to" +_lcl_to=`(test "x$prefix" = xNONE && prefix="$ac_default_prefix" + test "x$exec_prefix" = xNONE && exec_prefix="${prefix}" + _lcl_receval_old='' + while test "$_lcl_receval_old" != "$_lcl_receval"; do + _lcl_receval_old="$_lcl_receval" + eval _lcl_receval="\"$_lcl_receval\"" + done + echo "$_lcl_receval")` + _lcl_notation="$_lcl_from$_lcl_to" + case ":$_lcl_from:" in +# change empty paths to '.' + ::) _lcl_from='.' ;; +# strip trailing slashes + :*[\\/]:) _lcl_from=`echo "$_lcl_from" | sed 's,[\\/]*$,,'` ;; + :*:) ;; +esac +# squeze repeated slashes +case '/' in +# if the path contains any backslashes, turn slashes into backslashes + *\\*) _lcl_from=`echo "$_lcl_from" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g'` ;; +# if the path contains slashes, also turn backslashes into slashes + *) _lcl_from=`echo "$_lcl_from" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;; +esac + case ":$_lcl_to:" in +# change empty paths to '.' + ::) _lcl_to='.' ;; +# strip trailing slashes + :*[\\/]:) _lcl_to=`echo "$_lcl_to" | sed 's,[\\/]*$,,'` ;; + :*:) ;; +esac +# squeze repeated slashes +case '/' in +# if the path contains any backslashes, turn slashes into backslashes + *\\*) _lcl_to=`echo "$_lcl_to" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g'` ;; +# if the path contains slashes, also turn backslashes into slashes + *) _lcl_to=`echo "$_lcl_to" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;; +esac + _lcl_common_prefix='' +_lcl_second_prefix_match='' +while test "$_lcl_second_prefix_match" != 0; do + _lcl_first_prefix=`expr "x$_lcl_from" : "x\($_lcl_common_prefix/*[^/]*\)"` + _lcl_second_prefix_match=`expr "x$_lcl_to" : "x$_lcl_first_prefix"` + if test "$_lcl_second_prefix_match" != 0; then + if test "$_lcl_first_prefix" != "$_lcl_common_prefix"; then + _lcl_common_prefix="$_lcl_first_prefix" + else + _lcl_second_prefix_match=0 + fi + fi +done +_lcl_first_suffix=`expr "x$_lcl_from" : "x$_lcl_common_prefix/*\(.*\)"` +_lcl_first_rel='' +_lcl_tmp='xxx' +while test "$_lcl_tmp" != ''; do + _lcl_tmp=`expr "x$_lcl_first_suffix" : "x[^/]*/*\(.*\)"` + if test "$_lcl_first_suffix" != ''; then + _lcl_first_suffix="$_lcl_tmp" + _lcl_first_rel="../$_lcl_first_rel" + fi +done +_lcl_second_suffix=`expr "x$_lcl_to" : "x$_lcl_common_prefix/*\(.*\)"` +_lcl_result_tmp="$_lcl_first_rel$_lcl_second_suffix" + case ":$_lcl_result_tmp:" in +# change empty paths to '.' + ::) _lcl_result_tmp='.' ;; +# strip trailing slashes + :*[\\/]:) _lcl_result_tmp=`echo "$_lcl_result_tmp" | sed 's,[\\/]*$,,'` ;; + :*:) ;; +esac +# squeze repeated slashes +case "$_lcl_notation" in +# if the path contains any backslashes, turn slashes into backslashes + *\\*) _lcl_result_tmp=`echo "$_lcl_result_tmp" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g'` ;; +# if the path contains slashes, also turn backslashes into slashes + *) _lcl_result_tmp=`echo "$_lcl_result_tmp" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;; +esac + eval $_lcl_result_var='$_lcl_result_tmp' +done +case ":$bindir_to_pcbtreedir:" in +# change empty paths to '.' + ::) bindir_to_pcbtreedir='.' ;; +# strip trailing slashes + :*[\\/]:) bindir_to_pcbtreedir=`echo "$bindir_to_pcbtreedir" | sed 's,[\\/]*$,,'` ;; + :*:) ;; +esac +# squeze repeated slashes +case $PCB_DIR_SEPARATOR_S in +# if the path contains any backslashes, turn slashes into backslashes + *\\*) bindir_to_pcbtreedir=`echo "$bindir_to_pcbtreedir" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g'` ;; +# if the path contains slashes, also turn backslashes into slashes + *) bindir_to_pcbtreedir=`echo "$bindir_to_pcbtreedir" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;; +esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bindir_to_pcbtreedir" >&5 +$as_echo "$bindir_to_pcbtreedir" >&6; } + +cat >>confdefs.h <<_ACEOF +#define BINDIR_TO_PCBTREEDIR "$bindir_to_pcbtreedir" +_ACEOF + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the bindir to exec_prefix relative path" >&5 +$as_echo_n "checking for the bindir to exec_prefix relative path... " >&6; } +for _lcl_i in bindir:exec_prefix:bindir_to_execprefix; do + _lcl_from=\$`echo "$_lcl_i" | sed 's,:.*$,,'` + _lcl_to=\$`echo "$_lcl_i" | sed 's,^[^:]*:,,' | sed 's,:[^:]*$,,'` + _lcl_result_var=`echo "$_lcl_i" | sed 's,^.*:,,'` + _lcl_receval="$_lcl_from" +_lcl_from=`(test "x$prefix" = xNONE && prefix="$ac_default_prefix" + test "x$exec_prefix" = xNONE && exec_prefix="${prefix}" + _lcl_receval_old='' + while test "$_lcl_receval_old" != "$_lcl_receval"; do + _lcl_receval_old="$_lcl_receval" + eval _lcl_receval="\"$_lcl_receval\"" + done + echo "$_lcl_receval")` + _lcl_receval="$_lcl_to" +_lcl_to=`(test "x$prefix" = xNONE && prefix="$ac_default_prefix" + test "x$exec_prefix" = xNONE && exec_prefix="${prefix}" + _lcl_receval_old='' + while test "$_lcl_receval_old" != "$_lcl_receval"; do + _lcl_receval_old="$_lcl_receval" + eval _lcl_receval="\"$_lcl_receval\"" + done + echo "$_lcl_receval")` + _lcl_notation="$_lcl_from$_lcl_to" + case ":$_lcl_from:" in +# change empty paths to '.' + ::) _lcl_from='.' ;; +# strip trailing slashes + :*[\\/]:) _lcl_from=`echo "$_lcl_from" | sed 's,[\\/]*$,,'` ;; + :*:) ;; +esac +# squeze repeated slashes +case '/' in +# if the path contains any backslashes, turn slashes into backslashes + *\\*) _lcl_from=`echo "$_lcl_from" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g'` ;; +# if the path contains slashes, also turn backslashes into slashes + *) _lcl_from=`echo "$_lcl_from" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;; +esac + case ":$_lcl_to:" in +# change empty paths to '.' + ::) _lcl_to='.' ;; +# strip trailing slashes + :*[\\/]:) _lcl_to=`echo "$_lcl_to" | sed 's,[\\/]*$,,'` ;; + :*:) ;; +esac +# squeze repeated slashes +case '/' in +# if the path contains any backslashes, turn slashes into backslashes + *\\*) _lcl_to=`echo "$_lcl_to" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g'` ;; +# if the path contains slashes, also turn backslashes into slashes + *) _lcl_to=`echo "$_lcl_to" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;; +esac + _lcl_common_prefix='' +_lcl_second_prefix_match='' +while test "$_lcl_second_prefix_match" != 0; do + _lcl_first_prefix=`expr "x$_lcl_from" : "x\($_lcl_common_prefix/*[^/]*\)"` + _lcl_second_prefix_match=`expr "x$_lcl_to" : "x$_lcl_first_prefix"` + if test "$_lcl_second_prefix_match" != 0; then + if test "$_lcl_first_prefix" != "$_lcl_common_prefix"; then + _lcl_common_prefix="$_lcl_first_prefix" + else + _lcl_second_prefix_match=0 + fi + fi +done +_lcl_first_suffix=`expr "x$_lcl_from" : "x$_lcl_common_prefix/*\(.*\)"` +_lcl_first_rel='' +_lcl_tmp='xxx' +while test "$_lcl_tmp" != ''; do + _lcl_tmp=`expr "x$_lcl_first_suffix" : "x[^/]*/*\(.*\)"` + if test "$_lcl_first_suffix" != ''; then + _lcl_first_suffix="$_lcl_tmp" + _lcl_first_rel="../$_lcl_first_rel" + fi +done +_lcl_second_suffix=`expr "x$_lcl_to" : "x$_lcl_common_prefix/*\(.*\)"` +_lcl_result_tmp="$_lcl_first_rel$_lcl_second_suffix" + case ":$_lcl_result_tmp:" in +# change empty paths to '.' + ::) _lcl_result_tmp='.' ;; +# strip trailing slashes + :*[\\/]:) _lcl_result_tmp=`echo "$_lcl_result_tmp" | sed 's,[\\/]*$,,'` ;; + :*:) ;; +esac +# squeze repeated slashes +case "$_lcl_notation" in +# if the path contains any backslashes, turn slashes into backslashes + *\\*) _lcl_result_tmp=`echo "$_lcl_result_tmp" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g'` ;; +# if the path contains slashes, also turn backslashes into slashes + *) _lcl_result_tmp=`echo "$_lcl_result_tmp" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;; +esac + eval $_lcl_result_var='$_lcl_result_tmp' +done +case ":$bindir_to_execprefix:" in +# change empty paths to '.' + ::) bindir_to_execprefix='.' ;; +# strip trailing slashes + :*[\\/]:) bindir_to_execprefix=`echo "$bindir_to_execprefix" | sed 's,[\\/]*$,,'` ;; + :*:) ;; +esac +# squeze repeated slashes +case $PCB_DIR_SEPARATOR_S in +# if the path contains any backslashes, turn slashes into backslashes + *\\*) bindir_to_execprefix=`echo "$bindir_to_execprefix" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g'` ;; +# if the path contains slashes, also turn backslashes into slashes + *) bindir_to_execprefix=`echo "$bindir_to_execprefix" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;; +esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bindir_to_execprefix" >&5 +$as_echo "$bindir_to_execprefix" >&6; } + +cat >>confdefs.h <<_ACEOF +#define BINDIR_TO_EXECPREFIX "$bindir_to_execprefix" +_ACEOF + + + +BTNMOD=${BTNMOD:-"Mod1"} + + +TOPDIRS= +for dir in src lib newlib doc example tools tutorial README_FILES +do + test -d $dir/. && TOPDIRS="$TOPDIRS $dir" +done + + +ac_config_files="$ac_config_files Makefile data/Makefile intl/Makefile po/Makefile.in" + + +if test -d $srcdir/README_FILES; then + ac_config_files="$ac_config_files README_FILES/Makefile" + +fi +if test -d $srcdir/doc; then + ac_config_files="$ac_config_files doc/Makefile" + +fi +if test -d $srcdir/doc/gs; then + ac_config_files="$ac_config_files doc/gs/Makefile" + + ac_config_files="$ac_config_files doc/gs/gafrc" + + ac_config_files="$ac_config_files doc/gs/gschemrc" + +fi +if test -d $srcdir/example; then + ac_config_files="$ac_config_files example/Makefile" + + ac_config_files="$ac_config_files example/libraries/Makefile" + +fi +if test -d $srcdir/lib; then + ac_config_files="$ac_config_files lib/CreateLibraryContents.sh" + + ac_config_files="$ac_config_files lib/CreateLibrary.sh" + + ac_config_files="$ac_config_files lib/ListLibraryContents.sh" + + ac_config_files="$ac_config_files lib/Makefile" + + ac_config_files="$ac_config_files lib/QueryLibrary.sh" + + ac_config_files="$ac_config_files lib/qfp-ui" + +fi +if test -d $srcdir/newlib; then + ac_config_files="$ac_config_files newlib/2_pin_thru-hole_packages/Makefile" + + ac_config_files="$ac_config_files newlib/Makefile" + + ac_config_files="$ac_config_files newlib/connectors/Makefile" + + ac_config_files="$ac_config_files newlib/crystal/Makefile" + + ac_config_files="$ac_config_files newlib/electro-optics/Makefile" + + ac_config_files="$ac_config_files newlib/headers/Makefile" + + ac_config_files="$ac_config_files newlib/keystone/Makefile" + + ac_config_files="$ac_config_files newlib/msp430/Makefile" + + ac_config_files="$ac_config_files newlib/not_vetted_ingo/Makefile" + + ac_config_files="$ac_config_files newlib/sockets/Makefile" + + ac_config_files="$ac_config_files newlib/tests/Makefile" + +fi +ac_config_files="$ac_config_files src/Makefile" + +ac_config_files="$ac_config_files src/icons/Makefile" + +if test -d $srcdir/tools; then + ac_config_files="$ac_config_files tools/Makefile" + +fi +if test -d $srcdir/tutorial; then + ac_config_files="$ac_config_files tutorial/Makefile" + +fi + +ac_config_files="$ac_config_files tests/inputs/Makefile" + +ac_config_files="$ac_config_files tests/golden/Makefile" + +ac_config_files="$ac_config_files tests/golden/hid_bom1/Makefile" + +ac_config_files="$ac_config_files tests/golden/hid_bom2/Makefile" + +ac_config_files="$ac_config_files tests/golden/hid_bom3/Makefile" + +ac_config_files="$ac_config_files tests/golden/hid_bom4/Makefile" + +ac_config_files="$ac_config_files tests/golden/hid_gcode1/Makefile" + +ac_config_files="$ac_config_files tests/golden/hid_gcode2/Makefile" + +ac_config_files="$ac_config_files tests/golden/hid_gcode3/Makefile" + +ac_config_files="$ac_config_files tests/golden/hid_gcode4/Makefile" + +ac_config_files="$ac_config_files tests/golden/hid_gcode5/Makefile" + +ac_config_files="$ac_config_files tests/golden/hid_gcode6/Makefile" + +ac_config_files="$ac_config_files tests/golden/hid_gcode7/Makefile" + +ac_config_files="$ac_config_files tests/golden/hid_gcode8/Makefile" + +ac_config_files="$ac_config_files tests/golden/hid_gcode9/Makefile" + +ac_config_files="$ac_config_files tests/golden/hid_gcode10/Makefile" + +ac_config_files="$ac_config_files tests/golden/hid_gcode11/Makefile" + +ac_config_files="$ac_config_files tests/golden/hid_gerber1/Makefile" + +ac_config_files="$ac_config_files tests/golden/hid_gerber2/Makefile" + +ac_config_files="$ac_config_files tests/golden/hid_gerber3/Makefile" + +ac_config_files="$ac_config_files tests/golden/hid_png1/Makefile" + +ac_config_files="$ac_config_files tests/golden/hid_png2/Makefile" + +ac_config_files="$ac_config_files tests/golden/hid_png3/Makefile" + +ac_config_files="$ac_config_files tests/Makefile" + + +ac_config_files="$ac_config_files gts/Makefile" + + +ac_config_files="$ac_config_files w32/Makefile" + + +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, we kill variables containing newlines. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + + (set) 2>&1 | + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes: double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \. + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; #( + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) | + sed ' + /^ac_cv_env_/b end + t clear + :clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + test "x$cache_file" != "x/dev/null" && + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} + cat confcache >$cache_file + else + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + fi +fi +rm -f confcache + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +DEFS=-DHAVE_CONFIG_H + +ac_libobjs= +ac_ltlibobjs= +U= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`$as_echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" + as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + + if test -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 "${GIT_VERSION_TRUE}" && test -z "${GIT_VERSION_FALSE}"; then + as_fn_error $? "conditional \"GIT_VERSION\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${CVS_VERSION_TRUE}" && test -z "${CVS_VERSION_FALSE}"; then + as_fn_error $? "conditional \"CVS_VERSION\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${GIT_OR_CVS_VERSION_TRUE}" && test -z "${GIT_OR_CVS_VERSION_FALSE}"; then + as_fn_error $? "conditional \"GIT_OR_CVS_VERSION\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then + as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${WIN32_TRUE}" && test -z "${WIN32_FALSE}"; then + as_fn_error $? "conditional \"WIN32\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + as_fn_error $? "conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then + as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi + + ac_config_commands="$ac_config_commands po/stamp-it" + + +if test -z "${WITH_TOPOROUTER_TRUE}" && test -z "${WITH_TOPOROUTER_FALSE}"; then + as_fn_error $? "conditional \"WITH_TOPOROUTER\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${WITH_DBUS_TRUE}" && test -z "${WITH_DBUS_FALSE}"; then + as_fn_error $? "conditional \"WITH_DBUS\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${USE_GL_TRUE}" && test -z "${USE_GL_FALSE}"; then + as_fn_error $? "conditional \"USE_GL\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ENABLE_UPDATE_DESKTOP_DATABASE_TRUE}" && test -z "${ENABLE_UPDATE_DESKTOP_DATABASE_FALSE}"; then + as_fn_error $? "conditional \"ENABLE_UPDATE_DESKTOP_DATABASE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ENABLE_UPDATE_MIME_DATABASE_TRUE}" && test -z "${ENABLE_UPDATE_MIME_DATABASE_FALSE}"; then + as_fn_error $? "conditional \"ENABLE_UPDATE_MIME_DATABASE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${MISSING_PDFLATEX_TRUE}" && test -z "${MISSING_PDFLATEX_FALSE}"; then + as_fn_error $? "conditional \"MISSING_PDFLATEX\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${MISSING_TEXI2DVI_TRUE}" && test -z "${MISSING_TEXI2DVI_FALSE}"; then + as_fn_error $? "conditional \"MISSING_TEXI2DVI\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${MISSING_PS2PDF_TRUE}" && test -z "${MISSING_PS2PDF_FALSE}"; then + as_fn_error $? "conditional \"MISSING_PS2PDF\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${MISSING_GSCHEM_TRUE}" && test -z "${MISSING_GSCHEM_FALSE}"; then + as_fn_error $? "conditional \"MISSING_GSCHEM\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_TEST_TOOLS_TRUE}" && test -z "${HAVE_TEST_TOOLS_FALSE}"; then + as_fn_error $? "conditional \"HAVE_TEST_TOOLS\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${PNG_TRUE}" && test -z "${PNG_FALSE}"; then + as_fn_error $? "conditional \"PNG\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${GIF_TRUE}" && test -z "${GIF_FALSE}"; then + as_fn_error $? "conditional \"GIF\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${PNG_PREVIEW_TRUE}" && test -z "${PNG_PREVIEW_FALSE}"; then + as_fn_error $? "conditional \"PNG_PREVIEW\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_PCBLIB_NEWLIB_TRUE}" && test -z "${BUILD_PCBLIB_NEWLIB_FALSE}"; then + as_fn_error $? "conditional \"BUILD_PCBLIB_NEWLIB\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${DEBUG_BUILD_TRUE}" && test -z "${DEBUG_BUILD_FALSE}"; then + as_fn_error $? "conditional \"DEBUG_BUILD\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi + +: ${CONFIG_STATUS=./config.status} +ac_write_fail=0 +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +as_write_fail=0 +cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 +#! $SHELL +# Generated by $as_me. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false + +SHELL=\${CONFIG_SHELL-$SHELL} +export SHELL +_ASEOF +cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' + fi +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in #( + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +exec 6>&1 +## ----------------------------------- ## +## Main body of $CONFIG_STATUS script. ## +## ----------------------------------- ## +_ASEOF +test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# Save the log message, to keep $0 and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. +ac_log=" +This file was extended by pcb $as_me 20110918, which was +generated by GNU Autoconf 2.66. 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 the package provider." + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" +ac_cs_version="\\ +pcb config.status 20110918 +configured by $0, generated by GNU Autoconf 2.66, + with options \\"\$ac_cs_config\\" + +Copyright (C) 2010 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." + +ac_pwd='$ac_pwd' +srcdir='$srcdir' +INSTALL='$INSTALL' +MKDIR_P='$MKDIR_P' +AWK='$AWK' +test -n "\$AWK" || AWK=awk +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# The default lists apply if the user does not specify any file. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=*) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_shift=: + ;; + *) + ac_option=$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"` ;; + 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" +# Capture the value of obsolete ALL_LINGUAS because we need it to compute + # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it + # from automake. + eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"' + # Capture the value of LINGUAS because we need it to compute CATALOGS. + LINGUAS="${LINGUAS-%UNSET%}" + + +_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 + "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; + "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; + "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "data/Makefile") CONFIG_FILES="$CONFIG_FILES data/Makefile" ;; + "intl/Makefile") CONFIG_FILES="$CONFIG_FILES intl/Makefile" ;; + "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;; + "README_FILES/Makefile") CONFIG_FILES="$CONFIG_FILES README_FILES/Makefile" ;; + "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; + "doc/gs/Makefile") CONFIG_FILES="$CONFIG_FILES doc/gs/Makefile" ;; + "doc/gs/gafrc") CONFIG_FILES="$CONFIG_FILES doc/gs/gafrc" ;; + "doc/gs/gschemrc") CONFIG_FILES="$CONFIG_FILES doc/gs/gschemrc" ;; + "example/Makefile") CONFIG_FILES="$CONFIG_FILES example/Makefile" ;; + "example/libraries/Makefile") CONFIG_FILES="$CONFIG_FILES example/libraries/Makefile" ;; + "lib/CreateLibraryContents.sh") CONFIG_FILES="$CONFIG_FILES lib/CreateLibraryContents.sh" ;; + "lib/CreateLibrary.sh") CONFIG_FILES="$CONFIG_FILES lib/CreateLibrary.sh" ;; + "lib/ListLibraryContents.sh") CONFIG_FILES="$CONFIG_FILES lib/ListLibraryContents.sh" ;; + "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;; + "lib/QueryLibrary.sh") CONFIG_FILES="$CONFIG_FILES lib/QueryLibrary.sh" ;; + "lib/qfp-ui") CONFIG_FILES="$CONFIG_FILES lib/qfp-ui" ;; + "newlib/2_pin_thru-hole_packages/Makefile") CONFIG_FILES="$CONFIG_FILES newlib/2_pin_thru-hole_packages/Makefile" ;; + "newlib/Makefile") CONFIG_FILES="$CONFIG_FILES newlib/Makefile" ;; + "newlib/connectors/Makefile") CONFIG_FILES="$CONFIG_FILES newlib/connectors/Makefile" ;; + "newlib/crystal/Makefile") CONFIG_FILES="$CONFIG_FILES newlib/crystal/Makefile" ;; + "newlib/electro-optics/Makefile") CONFIG_FILES="$CONFIG_FILES newlib/electro-optics/Makefile" ;; + "newlib/headers/Makefile") CONFIG_FILES="$CONFIG_FILES newlib/headers/Makefile" ;; + "newlib/keystone/Makefile") CONFIG_FILES="$CONFIG_FILES newlib/keystone/Makefile" ;; + "newlib/msp430/Makefile") CONFIG_FILES="$CONFIG_FILES newlib/msp430/Makefile" ;; + "newlib/not_vetted_ingo/Makefile") CONFIG_FILES="$CONFIG_FILES newlib/not_vetted_ingo/Makefile" ;; + "newlib/sockets/Makefile") CONFIG_FILES="$CONFIG_FILES newlib/sockets/Makefile" ;; + "newlib/tests/Makefile") CONFIG_FILES="$CONFIG_FILES newlib/tests/Makefile" ;; + "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; + "src/icons/Makefile") CONFIG_FILES="$CONFIG_FILES src/icons/Makefile" ;; + "tools/Makefile") CONFIG_FILES="$CONFIG_FILES tools/Makefile" ;; + "tutorial/Makefile") CONFIG_FILES="$CONFIG_FILES tutorial/Makefile" ;; + "tests/inputs/Makefile") CONFIG_FILES="$CONFIG_FILES tests/inputs/Makefile" ;; + "tests/golden/Makefile") CONFIG_FILES="$CONFIG_FILES tests/golden/Makefile" ;; + "tests/golden/hid_bom1/Makefile") CONFIG_FILES="$CONFIG_FILES tests/golden/hid_bom1/Makefile" ;; + "tests/golden/hid_bom2/Makefile") CONFIG_FILES="$CONFIG_FILES tests/golden/hid_bom2/Makefile" ;; + "tests/golden/hid_bom3/Makefile") CONFIG_FILES="$CONFIG_FILES tests/golden/hid_bom3/Makefile" ;; + "tests/golden/hid_bom4/Makefile") CONFIG_FILES="$CONFIG_FILES tests/golden/hid_bom4/Makefile" ;; + "tests/golden/hid_gcode1/Makefile") CONFIG_FILES="$CONFIG_FILES tests/golden/hid_gcode1/Makefile" ;; + "tests/golden/hid_gcode2/Makefile") CONFIG_FILES="$CONFIG_FILES tests/golden/hid_gcode2/Makefile" ;; + "tests/golden/hid_gcode3/Makefile") CONFIG_FILES="$CONFIG_FILES tests/golden/hid_gcode3/Makefile" ;; + "tests/golden/hid_gcode4/Makefile") CONFIG_FILES="$CONFIG_FILES tests/golden/hid_gcode4/Makefile" ;; + "tests/golden/hid_gcode5/Makefile") CONFIG_FILES="$CONFIG_FILES tests/golden/hid_gcode5/Makefile" ;; + "tests/golden/hid_gcode6/Makefile") CONFIG_FILES="$CONFIG_FILES tests/golden/hid_gcode6/Makefile" ;; + "tests/golden/hid_gcode7/Makefile") CONFIG_FILES="$CONFIG_FILES tests/golden/hid_gcode7/Makefile" ;; + "tests/golden/hid_gcode8/Makefile") CONFIG_FILES="$CONFIG_FILES tests/golden/hid_gcode8/Makefile" ;; + "tests/golden/hid_gcode9/Makefile") CONFIG_FILES="$CONFIG_FILES tests/golden/hid_gcode9/Makefile" ;; + "tests/golden/hid_gcode10/Makefile") CONFIG_FILES="$CONFIG_FILES tests/golden/hid_gcode10/Makefile" ;; + "tests/golden/hid_gcode11/Makefile") CONFIG_FILES="$CONFIG_FILES tests/golden/hid_gcode11/Makefile" ;; + "tests/golden/hid_gerber1/Makefile") CONFIG_FILES="$CONFIG_FILES tests/golden/hid_gerber1/Makefile" ;; + "tests/golden/hid_gerber2/Makefile") CONFIG_FILES="$CONFIG_FILES tests/golden/hid_gerber2/Makefile" ;; + "tests/golden/hid_gerber3/Makefile") CONFIG_FILES="$CONFIG_FILES tests/golden/hid_gerber3/Makefile" ;; + "tests/golden/hid_png1/Makefile") CONFIG_FILES="$CONFIG_FILES tests/golden/hid_png1/Makefile" ;; + "tests/golden/hid_png2/Makefile") CONFIG_FILES="$CONFIG_FILES tests/golden/hid_png2/Makefile" ;; + "tests/golden/hid_png3/Makefile") CONFIG_FILES="$CONFIG_FILES tests/golden/hid_png3/Makefile" ;; + "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;; + "gts/Makefile") CONFIG_FILES="$CONFIG_FILES gts/Makefile" ;; + "w32/Makefile") CONFIG_FILES="$CONFIG_FILES w32/Makefile" ;; + "po/stamp-it") CONFIG_COMMANDS="$CONFIG_COMMANDS po/stamp-it" ;; + + *) 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= + trap 'exit_status=$? + { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status +' 0 + trap 'as_fn_exit 1' 1 2 13 15 +} +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + test -n "$tmp" && test -d "$tmp" +} || +{ + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 + +# Set up the scripts for CONFIG_FILES section. +# No need to generate them if there are no CONFIG_FILES. +# This happens for instance with `./config.status config.h'. +if test -n "$CONFIG_FILES"; then + + +ac_cr=`echo X | tr X '\015'` +# On cygwin, bash can eat \r inside `` if the user requested igncr. +# But we know of no other shell where ac_cr would be empty at this +# point, so we can use a bashism as a fallback. +if test "x$ac_cr" = x; then + eval ac_cr=\$\'\\r\' +fi +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` +if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then + ac_cs_awk_cr='\\r' +else + ac_cs_awk_cr=$ac_cr +fi + +echo 'BEGIN {' >"$tmp/subs1.awk" && +_ACEOF + + +{ + echo "cat >conf$$subs.awk <<_ACEOF" && + echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && + echo "_ACEOF" +} >conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + . ./conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + + ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` + if test $ac_delim_n = $ac_delim_num; then + break + elif $ac_last_try; then + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done +rm -f conf$$subs.sh + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>"\$tmp/subs1.awk" <<\\_ACAWK && +_ACEOF +sed -n ' +h +s/^/S["/; s/!.*/"]=/ +p +g +s/^[^!]*!// +:repl +t repl +s/'"$ac_delim"'$// +t delim +:nl +h +s/\(.\{148\}\)..*/\1/ +t more1 +s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ +p +n +b repl +:more1 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t nl +:delim +h +s/\(.\{148\}\)..*/\1/ +t more2 +s/["\\]/\\&/g; s/^/"/; s/$/"/ +p +b +:more2 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t delim +' >$CONFIG_STATUS || ac_write_fail=1 +rm -f conf$$subs.awk +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACAWK +cat >>"\$tmp/subs1.awk" <<_ACAWK && + for (key in S) S_is_set[key] = 1 + FS = "" + +} +{ + line = $ 0 + nfields = split(line, field, "@") + substed = 0 + len = length(field[1]) + for (i = 2; i < nfields; i++) { + key = field[i] + keylen = length(key) + if (S_is_set[key]) { + value = S[key] + line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) + len += length(value) + length(field[++i]) + substed = 1 + } else + len += 1 + keylen + } + + print line +} + +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" +else + cat +fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 +_ACEOF + +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), +# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// +s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// +s/^[^=]*=[ ]*$// +}' +fi + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +fi # test -n "$CONFIG_FILES" + +# Set up the scripts for CONFIG_HEADERS section. +# No need to generate them if there are no CONFIG_HEADERS. +# This happens for instance with `./config.status Makefile'. +if test -n "$CONFIG_HEADERS"; then +cat >"$tmp/defines.awk" <<\_ACAWK || +BEGIN { +_ACEOF + +# Transform confdefs.h into an awk script `defines.awk', embedded as +# here-document in config.status, that substitutes the proper values into +# config.h.in to produce config.h. + +# Create a delimiter string that does not exist in confdefs.h, to ease +# handling of long lines. +ac_delim='%!_!# ' +for ac_last_try in false false :; do + ac_t=`sed -n "/$ac_delim/p" confdefs.h` + if test -z "$ac_t"; then + break + elif $ac_last_try; then + as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +# For the awk script, D is an array of macro values keyed by name, +# likewise P contains macro parameters if any. Preserve backslash +# newline sequences. + +ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* +sed -n ' +s/.\{148\}/&'"$ac_delim"'/g +t rset +:rset +s/^[ ]*#[ ]*define[ ][ ]*/ / +t def +d +:def +s/\\$// +t bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3"/p +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p +d +:bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3\\\\\\n"\\/p +t cont +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p +t cont +d +:cont +n +s/.\{148\}/&'"$ac_delim"'/g +t clear +:clear +s/\\$// +t bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/"/p +d +:bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p +b cont +' >$CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + for (key in D) D_is_set[key] = 1 + FS = "" +} +/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { + line = \$ 0 + split(line, arg, " ") + if (arg[1] == "#") { + defundef = arg[2] + mac1 = arg[3] + } else { + defundef = substr(arg[1], 2) + mac1 = arg[2] + } + split(mac1, mac2, "(") #) + macro = mac2[1] + prefix = substr(line, 1, index(line, defundef) - 1) + if (D_is_set[macro]) { + # Preserve the white space surrounding the "#". + print prefix "define", macro P[macro] D[macro] + next + } else { + # Replace #undef with comments. This is necessary, for example, + # in the case of _POSIX_SOURCE, which is predefined and required + # on some systems where configure will not decide to define it. + if (defundef == "undef") { + print "/*", prefix defundef, macro, "*/" + next + } + } +} +{ print } +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 +fi # test -n "$CONFIG_HEADERS" + + +eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" +shift +for ac_tag +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; + esac + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + as_fn_append ac_file_inputs " '$ac_f'" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input='Generated from '` + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + `' by configure.' + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} + fi + # Neutralize special characters interpreted by sed in replacement strings. + case $configure_input in #( + *\&* | *\|* | *\\* ) + ac_sed_conf_input=`$as_echo "$configure_input" | + sed 's/[\\\\&|]/\\\\&/g'`;; #( + *) ac_sed_conf_input=$configure_input;; + esac + + case $ac_tag in + *:-:* | *:-) cat >"$tmp/stdin" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; + esac + ;; + esac + + ac_dir=`$as_dirname -- "$ac_file" || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir="$ac_dir"; as_fn_mkdir_p + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + + case $ac_mode in + :F) + # + # CONFIG_FILE + # + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; + esac + ac_MKDIR_P=$MKDIR_P + case $MKDIR_P in + [\\/$]* | ?:[\\/]* ) ;; + */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; + esac +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= +ac_sed_dataroot=' +/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p' +case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac +_ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_sed_extra="$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s|@configure_input@|$ac_sed_conf_input|;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@top_build_prefix@&$ac_top_build_prefix&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +s&@INSTALL@&$ac_INSTALL&;t t +s&@MKDIR_P@&$ac_MKDIR_P&;t t +$ac_datarootdir_hack +" +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&5 +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&2;} + + rm -f "$tmp/stdin" + case $ac_file in + -) cat "$tmp/out" && rm -f "$tmp/out";; + *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; + esac \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + ;; + :H) + # + # CONFIG_HEADER + # + if test x"$ac_file" != x-; then + { + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" + } >"$tmp/config.h" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then + { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 +$as_echo "$as_me: $ac_file is unchanged" >&6;} + else + rm -f "$ac_file" + mv "$tmp/config.h" "$ac_file" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + fi + else + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ + || as_fn_error $? "could not create -" "$LINENO" 5 + fi +# Compute "$ac_file"'s index in $config_headers. +_am_arg="$ac_file" +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $_am_arg | $_am_arg:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || +$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$_am_arg" : 'X\(//\)[^/]' \| \ + X"$_am_arg" : 'X\(//\)$' \| \ + X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$_am_arg" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'`/stamp-h$_am_stamp_count + ;; + + :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 +$as_echo "$as_me: executing $ac_file commands" >&6;} + ;; + esac + + + case $ac_file$ac_mode in + "depfiles":C) test x"$AMDEP_TRUE" != x"" || { + # Autoconf 2.62 quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`$as_dirname -- "$mf" || +$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$mf" : 'X\(//\)[^/]' \| \ + X"$mf" : 'X\(//\)$' \| \ + X"$mf" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$mf" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`$as_dirname -- "$file" || +$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$file" : 'X\(//\)[^/]' \| \ + X"$file" : 'X\(//\)$' \| \ + X"$file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir=$dirpart/$fdir; as_fn_mkdir_p + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done + done +} + ;; + "default-1":C) + for ac_file in $CONFIG_FILES; do + # Support "outfile[:infile[:infile...]]" + case "$ac_file" in + *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; + esac + # PO directories have a Makefile.in generated from Makefile.in.in. + case "$ac_file" in */Makefile.in) + # Adjust a relative srcdir. + ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` + ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" + ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` + # In autoconf-2.13 it is called $ac_given_srcdir. + # In autoconf-2.50 it is called $srcdir. + test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" + case "$ac_given_srcdir" in + .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; + /*) top_srcdir="$ac_given_srcdir" ;; + *) top_srcdir="$ac_dots$ac_given_srcdir" ;; + esac + if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then + rm -f "$ac_dir/POTFILES" + test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" + cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" + POMAKEFILEDEPS="POTFILES.in" + # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend + # on $ac_dir but don't depend on user-specified configuration + # parameters. + if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then + # The LINGUAS file contains the set of available languages. + if test -n "$OBSOLETE_ALL_LINGUAS"; then + test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" + fi + ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"` + # Hide the ALL_LINGUAS assigment from automake. + eval 'ALL_LINGUAS''=$ALL_LINGUAS_' + POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" + else + # The set of available languages was given in configure.in. + eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS' + fi + # Compute POFILES + # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) + # Compute UPDATEPOFILES + # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update) + # Compute DUMMYPOFILES + # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop) + # Compute GMOFILES + # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo) + case "$ac_given_srcdir" in + .) srcdirpre= ;; + *) srcdirpre='$(srcdir)/' ;; + esac + POFILES= + UPDATEPOFILES= + DUMMYPOFILES= + GMOFILES= + for lang in $ALL_LINGUAS; do + POFILES="$POFILES $srcdirpre$lang.po" + UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" + DUMMYPOFILES="$DUMMYPOFILES $lang.nop" + GMOFILES="$GMOFILES $srcdirpre$lang.gmo" + done + # CATALOGS depends on both $ac_dir and the user's LINGUAS + # environment variable. + INST_LINGUAS= + if test -n "$ALL_LINGUAS"; then + for presentlang in $ALL_LINGUAS; do + useit=no + if test "%UNSET%" != "$LINGUAS"; then + desiredlanguages="$LINGUAS" + else + desiredlanguages="$ALL_LINGUAS" + fi + for desiredlang in $desiredlanguages; do + # Use the presentlang catalog if desiredlang is + # a. equal to presentlang, or + # b. a variant of presentlang (because in this case, + # presentlang can be used as a fallback for messages + # which are not translated in the desiredlang catalog). + case "$desiredlang" in + "$presentlang"*) useit=yes;; + esac + done + if test $useit = yes; then + INST_LINGUAS="$INST_LINGUAS $presentlang" + fi + done + fi + CATALOGS= + if test -n "$INST_LINGUAS"; then + for lang in $INST_LINGUAS; do + CATALOGS="$CATALOGS $lang.gmo" + done + fi + test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" + sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" + for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do + if test -f "$f"; then + case "$f" in + *.orig | *.bak | *~) ;; + *) cat "$f" >> "$ac_dir/Makefile" ;; + esac + fi + done + fi + ;; + esac + done ;; + "po/stamp-it":C) + if ! grep "^# INTLTOOL_MAKEFILE$" "po/Makefile.in" > /dev/null ; then + as_fn_error $? "po/Makefile.in.in was not created by intltoolize." "$LINENO" 5 + fi + rm -f "po/stamp-it" "po/stamp-it.tmp" "po/POTFILES" "po/Makefile.tmp" + >"po/stamp-it.tmp" + sed '/^#/d + s/^[[].*] *// + /^[ ]*$/d + '"s|^| $ac_top_srcdir/|" \ + "$srcdir/po/POTFILES.in" | sed '$!s/$/ \\/' >"po/POTFILES" + + sed '/^POTFILES =/,/[^\\]$/ { + /^POTFILES =/!d + r po/POTFILES + } + ' "po/Makefile.in" >"po/Makefile" + rm -f "po/Makefile.tmp" + mv "po/stamp-it.tmp" "po/stamp-it" + ;; + + 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 + + +with_gui=`echo $with_gui` +with_printer=`echo $with_printer` +with_exporters=`echo $with_exporters | sed 's/,/ /g'` + +expandedXDGDATADIR=`eval "echo $XDGDATADIR"` +expandedKDEDATADIR=`eval "echo $KDEDATADIR"` + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: +** Configuration summary for $PACKAGE $VERSION: + + GUI: $with_gui + Printer: $with_printer + Exporters: $with_exporters + Coordinate type: $COORD_TYPE + Source tree distribution: $pcb_sources + Build documentation: $docs_yesno + Build toporouter: $enable_toporouter + Enable toporouter output: $enable_toporouter_output + xdg data directory: $expandedXDGDATADIR + KDE data directory: $expandedKDEDATADIR + dmalloc debugging: $with_dmalloc + ElectricFence debugging: $with_efence + + Cross Compiling: $cross_compiling + CC: $CC + CXX: $CXX + CPPFLAGS: $CPPFLAGS + CFLAGS: $CFLAGS + CXXFLAGS: $CXXFLAGS + LIBS: $LIBS + PCB: $PCB + +" >&5 +$as_echo " +** Configuration summary for $PACKAGE $VERSION: + + GUI: $with_gui + Printer: $with_printer + Exporters: $with_exporters + Coordinate type: $COORD_TYPE + Source tree distribution: $pcb_sources + Build documentation: $docs_yesno + Build toporouter: $enable_toporouter + Enable toporouter output: $enable_toporouter_output + xdg data directory: $expandedXDGDATADIR + KDE data directory: $expandedKDEDATADIR + dmalloc debugging: $with_dmalloc + ElectricFence debugging: $with_efence + + Cross Compiling: $cross_compiling + CC: $CC + CXX: $CXX + CPPFLAGS: $CPPFLAGS + CFLAGS: $CFLAGS + CXXFLAGS: $CXXFLAGS + LIBS: $LIBS + PCB: $PCB + +" >&6; } Property changes on: trunk/.pc/fix_CPPFLAGS.diff/configure ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Index: trunk/.pc/fix_CPPFLAGS.diff/configure.ac =================================================================== --- trunk/.pc/fix_CPPFLAGS.diff/configure.ac (nonexistent) +++ trunk/.pc/fix_CPPFLAGS.diff/configure.ac (revision 4) @@ -0,0 +1,1360 @@ +dnl Process this file with autoconf to produce a configure script. + +AC_INIT([pcb], [20110918]) +AC_CONFIG_SRCDIR([src/draw.c]) +AC_PREREQ([2.60]) +AM_INIT_AUTOMAKE([1.9]) +AC_GNU_SOURCE +AM_CONFIG_HEADER([config.h]) + +########################################################################## +# +# Try to figure out if we are building from git sources. +# If we are then unless building of the documentation has +# been disabled then just require the user have all the right +# tools. Users building from a tarball won't need latex, makeinfo, +# etc. but if you're already downloading development sources, then +# it is not unreasonable to require development tools. What motivated +# this is that using maintainer mode proved to cause regular confusion. + +pcb_sources="tarball" +AC_MSG_CHECKING([if you are building from a git checkout]) +pcb_git_version=no +if test -f $srcdir/.gitignore ; then + pcb_git_version=yes + AC_MSG_RESULT([yes]) + pcb_sources="GIT" +else + AC_MSG_RESULT([no]) +fi +AM_CONDITIONAL(GIT_VERSION, test x$pcb_git_version = xyes) + +AC_MSG_CHECKING([if you are building from a anoncvs checkout]) +pcb_cvs_version=no +if test -f $srcdir/CVS/Root ; then + pcb_cvs_version=yes + AC_MSG_RESULT([yes]) + pcb_sources="CVS" +else + AC_MSG_RESULT([no]) +fi +AM_CONDITIONAL(CVS_VERSION, test x$pcb_cvs_version = xyes) +AM_CONDITIONAL(GIT_OR_CVS_VERSION, test x$pcb_git_version = xyes -o x$pcb_cvs_version = xyes) + + +########################################################################## +# +# See if we are supposed to build the docs +# + +docs_yesno=yes +AC_MSG_CHECKING([if the documentation should be built]) +AC_ARG_ENABLE([doc], +[ --enable-doc Build and install the documentation [[default=yes]]], +[ +if test "X$enable_doc" = "Xno" ; then + DOC="" + AC_MSG_RESULT([no]) + docs_yesno=no +else + DOC=doc + AC_MSG_RESULT([yes]) + docs_yesno=yes +fi +], +[ +DOC=doc +AC_MSG_RESULT([yes]) +docs_yesno=yes +]) +AC_SUBST(DOC) + + +AC_MSG_CHECKING([if maintainer mode is required]) +if test "$docs_yesno" = "yes" -a "$pcb_git_version" = "yes" ; then + AC_MSG_RESULT([yes -- the documentation build is enabled and your sources are from git]) + enable_maintainer_mode=yes +else + AC_MSG_RESULT([no]) +fi + +AM_MAINTAINER_MODE + + +dnl determine host type +AC_CANONICAL_HOST +AC_MSG_CHECKING(for windows) +PCB_PATH_DELIMETER=":" +PCB_DIR_SEPARATOR_S="/" +PCB_DIR_SEPARATOR_C='/' +case $host in + *-*-cygwin* ) + CFLAGS="$CFLAGS ${CYGWIN_CFLAGS}" + CPPFLAGS="$CPPFLAGS ${CYGWIN_CPPFLAGS}" + ;; + + *-*-mingw* ) + WIN32=yes + CFLAGS="$CFLAGS ${MINGW_CFLAGS:--mms-bitfields -mwindows}" + CPPFLAGS="$CPPFLAGS ${MINGW_CPPFLAGS:--mms-bitfields -mwindows}" + ;; + + * ) + WIN32=no + ;; +esac + +AC_MSG_RESULT($WIN32) +AC_SUBST(WIN32) +AM_CONDITIONAL(WIN32, test x$WIN32 = xyes) +if test "x$WIN32" = "xyes" ; then + PCB_PATH_DELIMETER=";" + PCB_DIR_SEPARATOR_S="\\\\" + PCB_DIR_SEPARATOR_C='\\' +fi + +AC_DEFINE_UNQUOTED(PCB_DIR_SEPARATOR_C,'$PCB_DIR_SEPARATOR_C',[Directory separator char]) +AC_DEFINE_UNQUOTED(PCB_DIR_SEPARATOR_S,"$PCB_DIR_SEPARATOR_S",[Directory separator string]) +AC_DEFINE_UNQUOTED(PCB_PATH_DELIMETER,"$PCB_PATH_DELIMETER",[Search path separator string]) + + +dnl Checks for programs. +AC_PROG_CC +AC_PROG_CXX + +if test "x$WIN32" = "xyes" ; then + AC_CHECK_TOOL(WINDRES, windres, [no]) + if test "$WINDRES" = "no" ; then + AC_MSG_ERROR([*** Could not find an implementation of windres in your PATH.]) + fi +fi + +# i18n +GETTEXT_PACKAGE=$PACKAGE +AH_TEMPLATE([GETTEXT_PACKAGE], [Name of this program's gettext domain]) +AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], ["$GETTEXT_PACKAGE"]) +AC_SUBST(GETTEXT_PACKAGE) + +AM_GNU_GETTEXT_VERSION([0.14]) +AM_GNU_GETTEXT +IT_PROG_INTLTOOL([0.35.0]) + +AC_C_INLINE +AC_PROG_CC_STDC +AM_PROG_CC_C_O +AC_PROG_CPP +AC_PROG_AWK +AC_PROG_MKDIR_P + +AM_PROG_LEX +AC_PATH_PROG(LEX_PATH, $LEX, [notfound]) +if test "$LEX_PATH" = "notfound" ; then + AC_MSG_ERROR([Couldn't find a usable lex program. +Please install flex which is available from +ftp://ftp.gnu.org/pub/non-gnu/flex/ +]) +fi + + +AC_PROG_YACC +AC_PATH_PROG(YACC_PATH, $YACC, [notfound]) +if test "$YACC_PATH" = "notfound" ; then + AC_MSG_ERROR([Couldn't find a usable yacc program. +Please install bison which is available from +ftp://ftp.gnu.org/pub/gnu/bison/ +]) +fi + +AC_PROG_INSTALL +AC_PROG_RANLIB + +# +# Used for building the icons +# +AC_PATH_PROG(XPMTOPPM, xpmtoppm, notfound) +AC_PATH_PROG(PPMTOWINICON, ppmtowinicon, notfound) +AC_PATH_PROG(CONVERT, convert, notfound) + +########################################################################## +# +# +if test "X$docs_yesno" = "Xyes" -a "X$pcb_git_version" = "Xyes" ; then + AC_PATH_PROG(MKINFO, makeinfo, no) + if test "X$MKINFO" != "Xno"; then + AC_MSG_CHECKING([for GNU makeinfo version >= 4.6]) + v=`$MKINFO --version | grep "GNU texinfo"` + if test $? -ne 0; then + AC_MSG_RESULT([non-GNU]) + MKINFO="no" + fi + fi + if test "X$MKINFO" != "Xno"; then + vmajor=`echo "$v" | sed 's/.* \([[0-9]]*\)\.\([[0-9]]*\)$/\1/'` + vminor=`echo "$v" | sed 's/.* \([[0-9]]*\)\.\([[0-9]]*\)$/\2/'` + AC_MSG_RESULT([$vmajor.$vminor]) + if test "$vmajor" -lt 4 \ + || (test "$vmajor" -eq 4 && test "$vminor" -lt 6); then + MKINFO=no + fi + fi + if test "X$MKINFO" = "Xno"; then + AC_MSG_ERROR([You have requested a build +of the documentation. For this to work, you must have version 4.6 or newer of +the GNU texinfo package. You seem to have + +$v + +Please update to a newer version of texinfo or disable building of +the documentation with --disable-doc +]) + fi + + AC_PATH_PROG(TEXI2DVI, texi2dvi, no) + if test "X$TEXI2DVI" = "Xno"; then + AC_MSG_ERROR([You have requested a build +of the documentation. For this to work, you must have the texi2dvi program +installed. Alternatively, you can disable building the documentation with +--disable-doc.]) + fi + + + AC_PATH_PROG(PERL, perl, notfound) + if test "X$PERL" = "Xnotfound"; then + AC_MSG_ERROR([You have requested a build +of the documentation. For this to work, you must have perl installed. +Alternatively, you can disable building the documentation with +--disable-doc. +]) + fi + + + AC_PATH_PROG([KPSEWHICH], [kpsewhich], [no]) + if test "X$KPSEWHICH" = "Xno"; then + AC_MSG_ERROR([You have requested a build +of the documentation. For this to work, you must have a functional install of +TeX and LaTeX. kpsewhich is part of TeX. +Alternatively, you can disable building the documentation with +--disable-doc.]) + fi + + AC_MSG_CHECKING([If your TeX installation contains epsf.tex]) + f=`$KPSEWHICH epsf.tex` + if test $? -eq 0 ; then + AC_MSG_RESULT([yes ($f)]) + else + AC_MSG_RESULT([no]) + AC_MSG_ERROR([You have requested a build +of the documentation. For this to work, you must have a functional install of +TeX and LaTeX that includes epsf.tex. On some linux distributions this is +part of the texlive-generic-recommended package. +Alternatively, you can disable building the documentation with +--disable-doc.]) + fi + +fi + +########################################################################## +# +# + +# FIXME: for now, only try to add -rdynamic if we're using gcc. We really +# need to figure out what the correct test is here. In the mean time, this +# should let things build with SunPRO again. +if test "x$GCC" = "xyes"; then +AC_MSG_CHECKING([If the compiler accepts -rdynamic]) +old_LDFLAGS="$LDFLAGS" +LDFLAGS="$LDFLAGS -rdynamic" +AC_LINK_IFELSE([AC_LANG_PROGRAM()], + [AC_MSG_RESULT([yes])], + [LDFLAGS="$old_LDFLAGS" + AC_MSG_RESULT([no]) + ]) +fi + +# ------------- HID config ------------------- + +hid_guis="" +hid_printers="" +hid_exporters="" +hid_always="" + +for hid in `cd $srcdir/src/hid; echo *`; do + F=$srcdir/src/hid/$hid/hid.conf + if test -f $F + then + echo checking $F + . $F + case $type in + gui ) hid_guis="$hid_guis $hid" ;; + printer ) hid_printers="$hid_printers $hid" ;; + export ) hid_exporters="$hid_exporters $hid" ;; + always ) hid_always="$hid_always $hid" ;; + esac + fi +done + +AC_MSG_CHECKING([for which gui to use]) +AC_ARG_WITH([gui], +[ --with-gui= Specify the GUI to use: batch gtk lesstif [[default=gtk]]], +[], +[with_gui=gtk] +) +AC_MSG_RESULT([$with_gui]) +case " $hid_guis no none " in + *\ $with_gui\ * ) HIDLIST="$with_gui" ;; + * ) AC_MSG_ERROR([$with_gui is not a valid gui]) ;; +esac + +if test x"$with_gui" = x"none" -o x"$with_gui" = x"no" +then + HIDLIST= +fi + +AC_MSG_CHECKING([whether to enable toporouter]) +AC_ARG_ENABLE([toporouter], + [AS_HELP_STRING([--enable-toporouter], [build toporouter [default=yes]]) ] +) +AS_CASE(["x$enable_toporouter"],[xyes | xno],, + [enable_toporouter=yes + ] +) +AC_MSG_RESULT([$enable_toporouter]) +AM_CONDITIONAL([WITH_TOPOROUTER], test $enable_toporouter != no) + +AC_MSG_CHECKING([whether to enable toporouter output]) +AC_ARG_ENABLE([toporouter-output], + [AS_HELP_STRING([--enable-toporouter-output], [enable toporouter graphical output [default=no]]) ] +) +AS_CASE(["z$enable_toporouter_output"],[zyes | zno],, + [enable_toporouter_output=no] +) +AC_MSG_RESULT([$enable_toporouter_output]) +AS_CASE([$enable_toporouter_output],[yes], + [ + topo_output_enabled=1 + ], + [ + topo_output_enabled=0 + ] +) +AC_DEFINE_UNQUOTED([TOPO_OUTPUT_ENABLED], [$topo_output_enabled], + [Define to 1 to enable toporouter graphical output] +) + +PKG_PROG_PKG_CONFIG() + +if test "x$enable_toporouter_output" = "xyes"; then + PKG_CHECK_MODULES(CAIRO, cairo,, + [AC_MSG_ERROR([Cannot find cairo, needed by the toporouter +Please review the following errors: +$CAIRO_PKG_ERRORS])] + ) +fi + +AC_MSG_CHECKING([for whether to use DBUS]) +AC_ARG_ENABLE([dbus], +[ --enable-dbus Enable DBUS IPC], +[],[ + case " $with_gui " in + *\ gtk\ *) enable_dbus=yes ;; + *\ lesstif\ *) enable_dbus=yes ;; + * ) enable_dbus=no ;; + esac +]) + +AC_MSG_RESULT([$enable_dbus]) +AM_CONDITIONAL(WITH_DBUS, test x$enable_dbus = xyes) + +if test "x$enable_dbus" = "xyes"; then + case " $with_gui " in + *\ gtk\ *) ;; + *\ lesstif\ *) ;; + * ) AC_MSG_ERROR([DBUS enabled but only works with a mainloop capable GUI HID. +Either do not use --enable-dbus or enable the gtk or lesstif GUI HID.]) + esac + + PKG_CHECK_MODULES(DBUS, dbus-1 >= 0.61, + [saved_LIBS="$LIBS" + LIBS="$LIBS $DBUS_LIBS" + AC_CHECK_FUNCS(dbus_watch_get_unix_fd) + LIBS="$saved_LIBS" ], + [AC_MSG_ERROR([Cannot find dbus-1 >= 0.61, install it and rerun ./configure +Please review the following errors: +$DBUS_PKG_ERRORS])] + ) + DBUS_VERSION=`$PKG_CONFIG dbus-1 --modversion` + + AC_DEFINE([HAVE_DBUS], 1, + [Define to 1 if DBUS IPC is to be compiled in]) + +fi + + +AC_MSG_CHECKING([for whether to use GL drawing]) +AC_ARG_ENABLE([gl], +[ --enable-gl Enable GL drawing (with GTK HID)], +[],[ + case " $with_gui " in + *\ gtk\ *) enable_gl=yes;; + * ) enable_gl=no;; + esac +]) +AC_MSG_RESULT([$enable_gl]) +AM_CONDITIONAL(USE_GL, test x$enable_gl = xyes) + +if test "x$enable_gl" = "xyes"; then + case " $with_gui " in + *\ gtk\ *) ;; + * ) AC_MSG_ERROR([GL drawing enabled but only works with the GTK HID. +Either do not use --enable-gl or enable the gtk HID.]) + ;; + esac + + AX_CHECK_GL + AS_IF([test X$no_gl = Xyes], + [AC_MSG_FAILURE([OpenGL is required.])]) + + AX_CHECK_GLU + AS_IF([test X$no_glu = Xyes], + [AC_MSG_FAILURE([The OpenGL GLU library is required.])]) + + AC_DEFINE([ENABLE_GL], 1, + [Define to 1 if GL support is to be compiled in]) +fi + +AC_MSG_CHECKING([for which printer to use]) +AC_ARG_WITH([printer], +[ --with-printer= Specify the printer: lpr [[default=lpr]]], +[],[with_printer=lpr]) +AC_MSG_RESULT([$with_printer]) +case " $hid_printers " in + *\ $with_printer\ * ) + HIDLIST="$HIDLIST $with_printer" + ;; + * ) AC_MSG_ERROR([$with_printer is not a valid printer]) ;; +esac + +AC_MSG_CHECKING([for which exporters to use]) +AC_ARG_WITH([exporters], +[ --with-exporters= Enable export devices: bom gerber gcode nelma png ps [[default=bom gerber gcode nelma png ps]]], +[],[with_exporters=$hid_exporters]) +AC_MSG_RESULT([$with_exporters]) +for e in `echo $with_exporters | sed 's/,/ /g'`; do + case " $hid_exporters " in + *\ $e\ * ) + HIDLIST="$HIDLIST $e" + ;; + * ) AC_MSG_ERROR([$e is not a valid exporter]) ;; + esac +done + +if test "X$enable_jpeg" = "Xno" -a "X$enable_gif" = "Xno" -a "X$enable_png" = "Xno" ; then + case " ${HIDLIST} " in + *\ png\ *) + AC_MSG_ERROR([you have requested the png HID but turned off all output +formats! If you do not want gif/jpeg/png output, use --with-exporters to list +which exporters you want and do not list png there.]) + ;; + + *) + ;; + esac +fi + +for hid in $HIDLIST; do + F=$srcdir/src/hid/$hid/hid.conf + if test -f $F ; then + echo checking $hid depedencies + deps= + . $F + for dep in $deps; do + if test "X`echo $HIDLIST | grep $dep`" = "X"; then + AC_MSG_ERROR([you have requested the $hid HID but not the $dep HID, which it depends on]) + fi + done + fi +done + +for e in $HIDLIST; do + HIDLIBS="$HIDLIBS lib$e.a" +done + +AC_SUBST(HIDLIST) +AC_SUBST(HIDLIBS) + +# ------------- end HID config ------------------- + +###################################################################### +# +# desktop integration +# + +AC_PATH_PROG(SETENV, env, []) +AC_PATH_PROG(GTK_UPDATE_ICON_CACHE_BIN, gtk-update-icon-path, [true]) + +# Change default location for XDG files (MIME and Icons) +AC_ARG_WITH(xdgdatadir, [ --with-xdgdatadir=path Change where the theme icons +and mime registrations are installed [[DATADIR]]], [opt_xdgdatadir=$withval]) + +# Change default location for KDE data files (KDE MIME registrations) +AC_ARG_WITH(kdedatadir, [ --with-kdedatadir=path Change where the KDE mime reg +istrations are installed [[DATADIR]]], [opt_kdedatadir=$withval]) + +if test x$opt_xdgdatadir = x; then + # path was not specified with --with-xdgdatadir + XDGDATADIR='${datadir}' +else + # path WAS specified with --with-xdgdatadir + XDGDATADIR="$opt_xdgdatadir" +fi +AC_SUBST(XDGDATADIR) + +if test x$opt_kdedatadir = x; then + # path was not specified with --with-kdedatadir + KDEDATADIR='${datadir}' +else + # path WAS specified with --with-kdedatadir + KDEDATADIR="$opt_kdedatadir" +fi +AC_SUBST(KDEDATADIR) + +AC_ARG_ENABLE(update-desktop-database, + AC_HELP_STRING([--disable-update-desktop-database], + [do not update desktop database after installation]),, + enable_update_desktop_database=yes) + +AM_CONDITIONAL(ENABLE_UPDATE_DESKTOP_DATABASE, test x$enable_update_desktop_database = xyes) + +if test x$enable_update_desktop_database = xyes ; then + AC_PATH_PROG(UPDATE_DESKTOP_DATABASE, [update-desktop-database], no) + if test $UPDATE_DESKTOP_DATABASE = no; then + AC_MSG_ERROR([Cannot find update-desktop-database, make sure it is installed and in your PATH, or configure with --disable-update-desktop-database]) + fi +fi + +AC_ARG_ENABLE(update-mime-database, + AC_HELP_STRING([--disable-update-mime-database], + [do not update mime database after installation]),, + enable_update_mime_database=yes) + +AM_CONDITIONAL(ENABLE_UPDATE_MIME_DATABASE, test x$enable_update_mime_database = xyes) + +if test x$enable_update_mime_database = xyes ; then + AC_PATH_PROG(UPDATE_MIME_DATABASE, [update-mime-database], no) + if test $UPDATE_MIME_DATABASE = no; then + AC_MSG_ERROR([Cannot find update-mime-database, make sure it is installed and in your PATH, or configure with --disable-update-mime-database]) + fi +fi + +# +###################################################################### + +AC_PATH_PROGS(M4, gm4 m4, [none]) +if test "X$M4" = "Xnone" ; then + AC_MSG_ERROR([Did not find a m4 executible. You need to make sure + that m4 is installed on your system and that m4 is in your path]) +fi +AC_MSG_CHECKING([if $M4 has the division involving negative numbers bug]) +pcb_m4_r=`echo "eval(-2/2)" | $M4` +if test "$pcb_m4_r" != "-1" ; then + AC_MSG_RESULT([yes]) + AC_MSG_ERROR([It appears that $M4 has a bug involving division +with negative numbers. In particular it just returned the result that +-2/2 = $pcb_m4_r instead of -1. This is a known bug in GNU m4-1.4.9. Please +install a non-broken m4.]) +else + AC_MSG_RESULT([no]) +fi + + +AC_PATH_PROGS(WISH, wish wish85 wish8.5 wish83 wish8.3 wish80 wish8.0 cygwish83 cygwish80,[none]) +if test "X$WISH" = "Xnone" ; then + AC_MSG_ERROR([Did not find the wish executible. You need to make sure + that tcl is installed on your system and that wish is in your path]) +fi + +AC_DEFINE_UNQUOTED(M4,$M4,[m4 executible]) +GNUM4=$M4 +AC_SUBST(GNUM4) +AC_DEFINE_UNQUOTED(GNUM4,"$M4",[m4 program used by pcb]) + +AC_PATH_PROG(PDFLATEX, pdflatex, notfound) +AM_CONDITIONAL(MISSING_PDFLATEX, test x$PDFLATEX = xnotfound) + +AC_PATH_PROG(TEXI2DVI, texi2dvi, notfound) +AM_CONDITIONAL(MISSING_TEXI2DVI, test x$TEXI2DVI = xnotfound) + +AC_PATH_PROG(PS2PDF, ps2pdf, notfound) +AM_CONDITIONAL(MISSING_PS2PDF, test x$PS2PDF = xnotfound) + +# used to build some of the getting started guide +AC_PATH_PROG(GSCHEM, gschem, notfound) +AM_CONDITIONAL(MISSING_GSCHEM, test x$GSCHEM = xnotfound) + +if test "X$docs_yesno" = "Xyes" -a "X$pcb_git_version" = "Xyes" ; then + if test "$PDFLATEX" = "notfound" -o "$TEXI2DVI" = "notfound" -o "$PS2PDF" = "notfound" ; then + AC_MSG_ERROR([It appears that you are building from a source tree obtained +via git but you do not have the required tools installed to build the documentation. Here +is a list of tools and the detected values: +PDFLATEX: $PDFLATEX +TEXI2DVI: $TEXI2DVI +PS2PDF: $PS2PDF +GSCHEM: $GSCHEM + +Either make sure these tools are installed or disable building and installing the documentation +by using the --disable-doc configure option. +]) + fi +fi + +############################################################################ +# +# These checks are for tools used by the testsuite. It will not be fatal +# if these are missing because this is primarily for developer use. It is +# possible that we might add some --enable flag in the future that forces +# full tools for development work. + +# Check for ImageMagick tools used by the testsuite +AC_PATH_PROG(IM_ANIMATE, animate, notfound) +AC_PATH_PROG(IM_COMPARE, compare, notfound) +AC_PATH_PROG(IM_COMPOSITE, composite, notfound) +AC_PATH_PROG(IM_CONVERT, convert, notfound) +AC_PATH_PROG(IM_DISPLAY, display, notfound) +AC_PATH_PROG(IM_MONTAGE, montage, notfound) +missing_magick="" +test "${IM_ANIMATE}" != "notfound" || missing_magick="${missing_magick} animate" +test "${IM_COMPARE}" != "notfound" || missing_magick="${missing_magick} compare" +test "${IM_COMPOSITE}" != "notfound" || missing_magick="${missing_magick} composite" +test "${IM_CONVERT}" != "notfound" || missing_magick="${missing_magick} convert" +test "${IM_DISPLAY}" != "notfound" || missing_magick="${missing_magick} display" +test "${IM_MONTAGE}" != "notfound" || missing_magick="${missing_magick} montage" + +AC_MSG_CHECKING([if all ImageMagick tools needed for the testsuite were found]) +if test "X${missing_magick}" != "X" ; then + AC_MSG_RESULT([no. The testsuite will be disabled because the following +tools from the ImageMagick suite were not found: +${missing_magick} +No loss in pcb functionality should be experienced, you just will not +be able to run the full regression testsuite. +]) + have_magick=no +else + AC_MSG_RESULT([yes]) + have_magick=yes +fi + +have_test_tools=yes + +test $have_magick = yes || have_test_tools=no + +# the RS274-X export HID is partially checked by looking at the result with +# gerbv +AC_PATH_PROG(GERBV, gerbv, notfound) +test $GERBV != notfound || have_test_tools=no + + +AM_CONDITIONAL(HAVE_TEST_TOOLS, test x$have_test_tools = xyes) +AC_MSG_CHECKING([if all the requried testsuite tools were found]) +if test x$have_test_tools = xyes ; then + AC_MSG_RESULT([yes]) +else + AC_MSG_RESULT([no -- the testsuite will be disabled]) +fi + + +# +############################################################################ + + +dnl Checks for libraries. +AC_CHECK_LIB(m, sqrt) +AC_CHECK_LIB(dl, dlopen) +AC_CHECK_LIB(xnet, gethostbyname) +AC_CHECK_LIB(fl, yywrap) +AC_CHECK_FUNCS(strerror) +AC_CHECK_FUNCS(regcomp re_comp) +AC_CHECK_FUNCS(logf expf rint) +AC_CHECK_FUNCS(vsnprintf) +AC_CHECK_FUNCS(getpwuid getcwd) +AC_CHECK_FUNCS(rand random) +AC_CHECK_FUNCS(stat) + +AC_CHECK_FUNCS(mkdtemp) + +# normally used for all file i/o +AC_CHECK_FUNCS(popen) + +# for lrealpath.c +AC_CHECK_FUNCS(realpath canonicalize_file_name) +libiberty_NEED_DECLARATION(canonicalize_file_name) + +# for pcb_spawnvp in action.c on Windows +AC_CHECK_FUNCS(_spawnvp) + +AC_HEADER_STDC +AC_CHECK_HEADERS(limits.h locale.h string.h sys/types.h regex.h pwd.h) +AC_CHECK_HEADERS(sys/socket.h netinet/in.h netdb.h sys/param.h sys/times.h sys/wait.h) +AC_CHECK_HEADERS(dlfcn.h) + +if test "x${WIN32}" = "xyes" ; then + AC_CHECK_HEADERS(windows.h) +fi +# Search for glib +PKG_CHECK_MODULES(GLIB, glib-2.0, , + [AC_MSG_RESULT([Note: cannot find glib-2.0. +You may want to review the following errors: +$GLIB_PKG_ERRORS])] +) + +for e in $HIDLIST; do + case $e in + lesstif ) + AC_PATH_XTRA + CPPFLAGS="$CFLAGS $X_CFLAGS" + AC_CHECK_LIB(X11, XOpenDisplay, , , $X_LIBS) + AC_CHECK_LIB(ICE, main, , , $X_LIBS) + AC_CHECK_LIB(SM, main, , , $X_LIBS) + AC_CHECK_LIB(Xext, main, , , $X_LIBS) + AC_CHECK_LIB(Xt, XtOpenDisplay, , , $X_LIBS) + AC_CHECK_LIB(Xmu, main, , , $X_LIBS) + AC_CHECK_LIB(Xpm, main, , , $X_LIBS) + AC_CHECK_LIB(Xm, XmCreateMainWindow, , , $X_LIBS) + case $ac_cv_lib_Xm_XmCreateMainWindow in + no ) + AC_MSG_ERROR([You don't seem to have the Lesstif development environment installed.]) + ;; + * ) ;; + esac + AC_CHECK_HEADERS(Xm/Xm.h) + case $ac_cv_header_Xm_Xm_h in + no ) + AC_MSG_ERROR([You don't seem to have the Lesstif development environment installed.]) + ;; + * ) ;; + esac + ;; + + gtk ) + # Check for pkg-config + AC_PATH_PROG(PKG_CONFIG, pkg-config, no) + if test "$PKG_CONFIG" = "no"; then + AC_MSG_ERROR([Cannot find pkg-config, make sure it is installed and in your PATH]) + fi + + PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.18.0, , + [AC_MSG_ERROR([Cannot find gtk+ >= 2.18.0, install it and rerun ./configure +Please review the following errors: +$GTK_PKG_ERRORS])] + ) + GTK_VERSION=`$PKG_CONFIG gtk+-2.0 --modversion` + GLIB_VERSION=`$PKG_CONFIG glib-2.0 --modversion` + + if test "x$enable_gl" = "xyes"; then + # Check for GtkGLExt + PKG_CHECK_MODULES(GTKGLEXT, gtkglext-1.0 >= 1.0.0, , [AC_MSG_ERROR([ +*** Required version of gtkglext is not installed - please install first *** +Please review the following errors: +$GTKGLEXT_PKG_ERRORS])] + ) + GTKGLEXT_VER=`$PKG_CONFIG gtkglext-1.0 --modversion` + fi + + ;; + + gcode|nelma|png ) + # Check for gdlib-config for gd (www.boutell.com/gd) + AC_PATH_PROG(GDLIB_CONFIG, gdlib-config, no) + if test "$GDLIB_CONFIG" = "no"; then + AC_MSG_RESULT([Cannot find gdlib-config. +Make sure it is installed and in your PATH. +gdlib-config is part of the GD library available from www.boutell.com/gd. +This is needed for the png HID. I will look for libgd anyway and maybe +you will get lucky. +]) + if test "$WIN32" != "yes" ; then + AC_CHECK_LIB(gd,main,, + AC_MSG_ERROR([[You have requested gcode, nelma, or png HIDs but -lgd could not be found]])) + else + AC_CHECK_LIB(bgd,main,, + AC_MSG_ERROR([[You have requested gcode, nelma, or png HIDs but -lbgd could not be found]])) + fi + else + if test "$WIN32" = "yes" ; then + GD=bgd + else + GD=gd + fi + AC_MSG_CHECKING([for libgd cflags]) + GD_CFLAGS="`$GDLIB_CONFIG --cflags`" + AC_MSG_RESULT([$GD_CFLAGS]) + AC_MSG_CHECKING([for libgd libs]) + GD_LIBS="`$GDLIB_CONFIG --ldflags` `$GDLIB_CONFIG --libs` -l${GD}" + AC_MSG_RESULT([$GD_LIBS]) + fi + + # since some linux systems evidently install gdlib-config but fail to + # install the headers (nice), check for the header too and fail if it + # is not there. + CFLAGS="$CFLAGS $GD_CFLAGS" + CPPFLAGS="$CPPFLAGS $GD_CFLAGS" + AC_CHECK_HEADERS(gd.h) + case $ac_cv_header_gd_h in + no ) + AC_MSG_ERROR([ +You evidentally do not have a complete installation of the GD library available from www.boutell.com/gd. +This is needed for the nelma and/or png HID. +]) + ;; + * ) ;; + esac + + # Some versions of gd (prior to the expiration of the + # patent related to gif compression) do not support + # gif output. Check for that here. + save_LIBS="$LIBS" + LIBS="$save_LIBS $GD_LIBS $X_LIBS" + + AC_MSG_CHECKING([if GIF output from the png HID is desired]) + AC_ARG_ENABLE([gif], + [ --disable-gif Disable support for gif output when the png HID is used [[default=include gif support]]], + [ + if test "X$enable_gif" != "Xno" ; then + AC_MSG_RESULT([yes]) + with_gif=yes + else + AC_MSG_RESULT([no]) + with_gif=no + fi + ], + [ + AC_MSG_RESULT([yes]) + with_gif=yes + ]) + if test "X$with_gif" = "Xyes" ; then + AC_CHECK_FUNCS(gdImageGif) + if test "$ac_cv_func_gdImageGif" != "yes"; then + AC_MSG_ERROR([Your gd installation does not appear to include gif support. +You may need to update your installation of gd or disable +gif export with --disable-gif]) + fi + fi + + AC_MSG_CHECKING([if JPEG output from the png HID is desired]) + AC_ARG_ENABLE([jpeg], + [ --disable-jpeg Disable support for JPEG output when the png HID is used [[default=include JPEG support]]], + [ + if test "X$enable_jpeg" != "Xno" ; then + AC_MSG_RESULT([yes]) + with_jpeg=yes + else + AC_MSG_RESULT([no]) + with_jpeg=no + fi + ], + [ + AC_MSG_RESULT([yes]) + with_jpeg=yes + ]) + if test "X$with_jpeg" = "Xyes" ; then + AC_CHECK_FUNCS(gdImageJpeg) + if test "$ac_cv_func_gdImageJpeg" != "yes"; then + AC_MSG_ERROR([Your gd installation does not appear to include JPEG support. +You may need to update your installation of gd or disable +JPEG export with --disable-jpeg]) + fi + fi + + + AC_MSG_CHECKING([if PNG output from the png HID is desired]) + AC_ARG_ENABLE([png], + [ --disable-png Disable support for PNG output when the png HID is used [[default=include PNG support]]], + [ + if test "X$enable_png" != "Xno" ; then + AC_MSG_RESULT([yes]) + with_png=yes + else + AC_MSG_RESULT([no]) + with_png=no + fi + ], + [ + AC_MSG_RESULT([yes]) + with_png=yes + ]) + if test "X$with_png" = "Xyes" ; then + AC_CHECK_FUNCS(gdImagePng) + if test "$ac_cv_func_gdImagePng" != "yes"; then + AC_MSG_ERROR([Your gd installation does not appear to include PNG support. +You may need to update your installation of gd or disable +PNG export with --disable-png]) + fi + fi + LIBS="$save_LIBS" + ;; + + esac +done + + +AM_CONDITIONAL(PNG, test x$with_png = xyes) +AM_CONDITIONAL(GIF, test x$with_gif = xyes) + +# ------------- check if png previews should be built for pcblib-newlib +AC_MSG_CHECKING([if the m4lib to newlib export should create png previews]) +AC_ARG_ENABLE( + [m4lib-png], + [ --enable-m4lib-png Enable creating png previews for the m4 library], + [],[enable_m4lib_png=no]) +AC_MSG_RESULT([$enable_m4lib_png]) +AM_CONDITIONAL(PNG_PREVIEW, test x$enable_m4lib_png = xyes) + + +# Run away.... more ugly stuff here. By default we don't actually build +# pcblib-newlib from pcblib unless we are building from cvs or git sources. +# The reason is it takes a while and requires the png HID. The problem is, +# what if someone wants to use --enable-m4lib-png but the tarball was built +# without the previews. Or, what if someone does not want the PNG previews +# but the person building the tarball included them. Ugh! So what the following +# code attempts to do is detect that mismatch situation. Note that we only +# want to kick this code in when *not* building from git or cvs sources. +build_pcblib_newlib=no +if test "$pcb_sources" = "tarball" ; then + AC_MSG_CHECKING([If pcblib-newlib was built with png previews]) + stamp=$srcdir/lib/pcblib-newlib.stamp + if test ! -f ${stamp} ; then + AC_MSG_RESULT([unknown, missing ${stamp}]) + build_pcblib_newlib=yes + else + if test "`cat ${stamp}`" = "png-preview=yes" ; then + AC_MSG_RESULT([yes]) + # lib exists and built with preview. + # if we don't want the preview, than rebuild + if test x$enable_m4lib_png != xyes ; then + build_pcblib_newlib=yes + fi + else + AC_MSG_RESULT([no]) + # lib exists and built without preview. + # if we want the preview, than rebuild + if test x$enable_m4lib_png = xyes ; then + build_pcblib_newlib=yes + fi + fi + fi +else + build_pcblib_newlib=yes +fi +AC_MSG_CHECKING([If pcblib-newlib needs to be rebuilt]) +AC_MSG_RESULT([$build_pcblib_newlib]) +AM_CONDITIONAL(BUILD_PCBLIB_NEWLIB, test x$build_pcblib_newlib = xyes) + +if test "X$cross_compiling" = "Xyes" ; then + # we are cross compiling so we will need a build host binary for pcb + AC_PATH_PROG(PCB, [pcb], [notfound]) +else + PCB="\${top_builddir}/src/pcb" +fi +AC_SUBST(PCB) + +# now make see how essential it was that we have a pcb executable for the build +# host +if test "X$pcb_git_version" = "Xyes" ; then + if test "X$docs_yesno" = "Xyes" -o "X$enable_m4lib_png" = "Xyes" ; then + if test "$PCB" = "notfound" ; then + AC_MSG_ERROR([You have selected a build with m4lib png +previews enabled and/or with building the documentation enabled but you also +appear to be cross-compiling. For this to work, you must have a pcb installed that +can run on this machine (the build machine) because it is needed for generating +library footprint png previews as well as some of the figures in the documentation. +If you wish to skip building the documentation and the footprint previews then add +--disable-doc --disable-m4lib-png +This will allow your cross build to work.]) + fi + fi +fi + +# ------------- Xrender ------------------- +have_xrender=no +AC_CHECK_LIB(Xrender,XRenderQueryExtension,have_xrender=yes,have_xrender=no,$X_LIBS) + +AC_ARG_ENABLE([xrender], +[ --disable-xrender Compile and link with Xrender [default=yes]]) +case "$have_xrender:$enable_xrender" in + no:* ) ;; + *:no ) ;; + * ) + X_LIBS="-lXrender $X_LIBS" + AC_DEFINE([HAVE_XRENDER], 1, + [Define to 1 if Xrender is available]) + ;; +esac + +# ------------- Xinerama ------------------- +have_xinerama=no +AC_CHECK_LIB(Xinerama,XineramaQueryExtension,have_xinerama=yes,have_xinerama=no,$X_LIBS) + +AC_ARG_ENABLE([xinerama], +[ --disable-xinerama Compile and link with Xinerama [default=yes]]) +case "$have_xinerama:$enable_xinerama" in + no:* ) ;; + *:no ) ;; + * ) + X_LIBS="-lXinerama $X_LIBS" + AC_DEFINE([HAVE_XINERAMA], 1, + [Define to 1 if Xinerama is available]) + ;; +esac + +# ------------- dmalloc ------------------- +dnl dmalloc checks +with_dmalloc=no +AC_MSG_CHECKING([if dmalloc debugging should be enabled]) +AC_ARG_ENABLE([dmalloc], +[ --enable-dmalloc Compile and link with dmalloc for malloc debugging [default=no]], +[ +if test "X$enable_dmalloc" != "Xno" ; then + AC_MSG_RESULT([yes]) + AC_CHECK_HEADER(dmalloc.h,, + AC_MSG_ERROR([You have requested dmalloc debugging but dmalloc.h could not be found])) + AC_CHECK_LIB(dmalloc,main,, + AC_MSG_ERROR([You have requested dmalloc debugging but -ldmalloc could not be found])) + DMALLOC_LIBS="-ldmalloc" + with_dmalloc=yes +else + AC_MSG_RESULT([no]) + DMALLOC_LIBS="" +fi +], +[ + AC_MSG_RESULT([no]) + DMALLOC_LIBS="" +]) + +# ------------- ElectricFence ------------------- +dnl ElectricFence checks +with_efence=no +AC_MSG_CHECKING([if ElectricFence debugging should be enabled]) +AC_ARG_ENABLE([efence], +[ --enable-efence Link with ElectricFence for malloc debugging [default=no]], +[ +if test "X$enable_efence" != "Xno" ; then + AC_MSG_RESULT([yes]) + AC_CHECK_LIB(efence,main,, + AC_MSG_ERROR([You have requested ElectricFence debugging but -lefence could not be found])) + with_efence=yes +else + AC_MSG_RESULT([no]) +fi +], +[ +AC_MSG_RESULT([no]) +]) + +# ------------- Enable Debug code ------------------- +AC_MSG_CHECKING([for whether to enable debugging code]) +AC_ARG_ENABLE([debug], +[ --enable-debug Enable debugging code], +[],[enable_debug=no]) + +AC_MSG_RESULT([$enable_debug]) +AM_CONDITIONAL(DEBUG_BUILD, test x$enable_debug = xyes) + +# ------------- mkdir required for win32 compatibility ------------ +# WIN32 mkdir takes only one argument, POSIX takes two. +# #include "misc.h" where mkdir is required. +m4_include([m4/m4_ax_func_mkdir.m4]) +AX_FUNC_MKDIR + +# ------------- Type used for "Coord" type ------------------- + +AC_CHECK_HEADERS(stdint.h) +AC_ARG_ENABLE([coord64], +[ --enable-coord64 Force 64-bit coordinate types], +[],[enable_coord64=no]) +AC_ARG_ENABLE([coord32], +[ --enable-coord32 Force 32-bit coordinate types], +[],[enable_coord32=no]) + +COORDTYPE="long" + +echo "$enable_coord32:$enable_coord64:$ac_cv_header_stdint_h" +case "$enable_coord32:$enable_coord64:$ac_cv_header_stdint_h" in + yes:no:yes ) + COORD_TYPE="int32_t" + COORD_MAX="INT32_MAX" + ;; + no:yes:yes ) + COORD_TYPE="int64_t" + COORD_MAX="INT64_MAX" + ;; + yes:no:no ) + COORD_TYPE="int" + COORD_MAX="INT_MAX" + ;; + no:yes:no ) + COORD_TYPE="long long" + COORD_MAX="LLONG_MAX" + ;; + yes:yes:* ) + AC_MSG_ERROR("*** cannot require both 32 and 64 bit coordinates") + ;; + *:*:* ) + COORD_TYPE="long" + COORD_MAX="LONG_MAX" + ;; +esac +AC_DEFINE_UNQUOTED([COORD_TYPE],[$COORD_TYPE], + [C type for Coordinates]) +AC_DEFINE_UNQUOTED([COORD_MAX],[$COORD_MAX], + [Maximum value of coordinate type]) + +# ------------- Complete set of CFLAGS and LIBS ------------------- + +CFLAGS="$CFLAGS $X_CFLAGS $DBUS_CFLAGS $GLIB_CFLAGS $GTK_CFLAGS $CAIRO_CFLAGS $GTKGLEXT_CFLAGS $GLU_CFLAGS $GL_CFLAGS" +LIBS="$LIBS $XM_LIBS $DBUS_LIBS $X_LIBS $GLIB_LIBS $GTK_LIBS $DMALLOC_LIBS $GD_LIBS $INTLLIBS $CAIRO_LIBS $GTKGLEXT_LIBS $GLU_LIBS $GL_LIBS" + + +# if we have gcc then add -Wall +if test "x$GCC" = "xyes"; then + # see about adding some extra checks if the compiler takes them + for flag in -Wall ; do + case " ${CFLAGS} " in + *\ ${flag}\ *) + # flag is already present + ;; + *) + AC_MSG_CHECKING([if the compiler accepts ${flag}]) + ac_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS ${flag}" + AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], + [AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no]) + CFLAGS="$ac_save_CFLAGS" + ] + ) + ;; + esac + done +fi + +CXXFLAGS="$CFLAGS" + +# Now add C-specific flags +if test "x$GCC" = "xyes"; then + # see about adding some extra checks if the compiler takes them + for flag in -Wdeclaration-after-statement ; do + case " ${CFLAGS} " in + *\ ${flag}\ *) + # flag is already present + ;; + *) + AC_MSG_CHECKING([if the compiler accepts ${flag}]) + ac_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS ${flag}" + AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], + [AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no]) + CFLAGS="$ac_save_CFLAGS" + ] + ) + ;; + esac + done +fi + +# See if we are building gcc with C++. +AC_ARG_ENABLE(build-with-cxx, +[ --enable-build-with-cxx build with C++ compiler instead of C compiler], +ENABLE_BUILD_WITH_CXX=$enableval, +ENABLE_BUILD_WITH_CXX=no) + +case "$ENABLE_BUILD_WITH_CXX" in + yes) + CC_OR_CXX="$CXX" + CC_OR_CXX_FLAGS="$CXXFLAGS" + ;; + no) + CC_OR_CXX="$CC" + CC_OR_CXX_FLAGS="$CFLAGS" + ;; +esac +AC_SUBST(CC_OR_CXX) +AC_SUBST(CC_OR_CXX_FLAGS) + +# font filename +FONTFILENAME=${FONTFILENAME:-"default_font"} +AC_SUBST(FONTFILENAME) +AC_DEFINE_UNQUOTED(FONTFILENAME,"$FONTFILENAME",[File for default font]) + +# standard autoconf variables +CPPFLAGS="$CPPFLAGS -DPREFIXDIR=\\\"\${prefix}\\\"" +CPPFLAGS="$CPPFLAGS -DBINDIR=\\\"\${bindir}\\\"" +CPPFLAGS="$CPPFLAGS -DHOST=\\\"\${host}\\\"" + +# directory for old-style library and for fonts +PCBLIBDIR=${datadir}/pcb +AC_SUBST(PCBLIBDIR) +#AC_DEFINE_UNQUOTED(PCBLIBDIR,"$PCBLIBDIR",[Library directory]) +CPPFLAGS="$CPPFLAGS -DPCBLIBDIR=\\\"$PCBLIBDIR\\\"" + +# name for old-style library +LIBRARYFILENAME=pcblib +AC_SUBST(LIBRARYFILENAME) +AC_DEFINE_UNQUOTED(LIBRARYFILENAME,"$LIBRARYFILENAME",[library file name]) + + +# directory for new library +PCBTREEDIR=${datadir}/pcb/newlib +PCBTREEPATH=${PCBTREEDIR}:${PCBLIBDIR}/pcblib-newlib +PCBTREEDIR=${PCBTREEDIR:-"$PCBTREEDIR"} +AC_SUBST(PCBTREEDIR) +AC_SUBST(PCBTREEPATH) +#AC_DEFINE_UNQUOTED(PCBTREEDIR,"$PCBLIB",[top directory for new style pcb library]) +CPPFLAGS="$CPPFLAGS -DPCBTREEDIR=\\\"$PCBTREEDIR\\\"" +CPPFLAGS="$CPPFLAGS -DPCBTREEPATH=\\\"$PCBTREEPATH\\\"" + +# Figure out relative paths +AC_MSG_CHECKING([for the bindir to pcblibdir relative path]) +adl_COMPUTE_RELATIVE_PATHS([bindir:PCBLIBDIR:bindir_to_pcblibdir]) +adl_NORMALIZE_PATH([bindir_to_pcblibdir], [$PCB_DIR_SEPARATOR_S]) +AC_MSG_RESULT([$bindir_to_pcblibdir]) +AC_DEFINE_UNQUOTED(BINDIR_TO_PCBLIBDIR, "$bindir_to_pcblibdir", [Relative path from bindir to pcblibdir]) + +AC_MSG_CHECKING([for the bindir to pcbtreedir relative path]) +adl_COMPUTE_RELATIVE_PATHS([bindir:PCBTREEDIR:bindir_to_pcbtreedir]) +adl_NORMALIZE_PATH([bindir_to_pcbtreedir], [$PCB_DIR_SEPARATOR_S]) +AC_MSG_RESULT([$bindir_to_pcbtreedir]) +AC_DEFINE_UNQUOTED(BINDIR_TO_PCBTREEDIR, "$bindir_to_pcbtreedir", [Relative path from bindir to pcbtreedir]) + + +AC_MSG_CHECKING([for the bindir to exec_prefix relative path]) +adl_COMPUTE_RELATIVE_PATHS([bindir:exec_prefix:bindir_to_execprefix]) +adl_NORMALIZE_PATH([bindir_to_execprefix], [$PCB_DIR_SEPARATOR_S]) +AC_MSG_RESULT([$bindir_to_execprefix]) +AC_DEFINE_UNQUOTED(BINDIR_TO_EXECPREFIX, "$bindir_to_execprefix", [Relative path from bindir to exec_prefix]) + + +BTNMOD=${BTNMOD:-"Mod1"} +AC_SUBST(BTNMOD) + +TOPDIRS= +for dir in src lib newlib doc example tools tutorial README_FILES +do + test -d $dir/. && TOPDIRS="$TOPDIRS $dir" +done +AC_SUBST(TOPDIRS) + +AC_CONFIG_FILES(Makefile data/Makefile intl/Makefile po/Makefile.in) + +if test -d $srcdir/README_FILES; then + AC_CONFIG_FILES(README_FILES/Makefile) +fi +if test -d $srcdir/doc; then + AC_CONFIG_FILES(doc/Makefile) +fi +if test -d $srcdir/doc/gs; then + AC_CONFIG_FILES(doc/gs/Makefile) + AC_CONFIG_FILES(doc/gs/gafrc) + AC_CONFIG_FILES(doc/gs/gschemrc) +fi +if test -d $srcdir/example; then + AC_CONFIG_FILES(example/Makefile) + AC_CONFIG_FILES(example/libraries/Makefile) +fi +if test -d $srcdir/lib; then + AC_CONFIG_FILES(lib/CreateLibraryContents.sh) + AC_CONFIG_FILES(lib/CreateLibrary.sh) + AC_CONFIG_FILES(lib/ListLibraryContents.sh) + AC_CONFIG_FILES(lib/Makefile) + AC_CONFIG_FILES(lib/QueryLibrary.sh) + AC_CONFIG_FILES(lib/qfp-ui) +fi +if test -d $srcdir/newlib; then + AC_CONFIG_FILES(newlib/2_pin_thru-hole_packages/Makefile) + AC_CONFIG_FILES(newlib/Makefile) + AC_CONFIG_FILES(newlib/connectors/Makefile) + AC_CONFIG_FILES(newlib/crystal/Makefile) + AC_CONFIG_FILES(newlib/electro-optics/Makefile) + AC_CONFIG_FILES(newlib/headers/Makefile) + AC_CONFIG_FILES(newlib/keystone/Makefile) + AC_CONFIG_FILES(newlib/msp430/Makefile) + AC_CONFIG_FILES(newlib/not_vetted_ingo/Makefile) + AC_CONFIG_FILES(newlib/sockets/Makefile) + AC_CONFIG_FILES(newlib/tests/Makefile) +fi +AC_CONFIG_FILES(src/Makefile) +AC_CONFIG_FILES(src/icons/Makefile) +if test -d $srcdir/tools; then + AC_CONFIG_FILES(tools/Makefile) +fi +if test -d $srcdir/tutorial; then + AC_CONFIG_FILES(tutorial/Makefile) +fi + +dnl testsuite +AC_CONFIG_FILES(tests/inputs/Makefile) +AC_CONFIG_FILES(tests/golden/Makefile) +AC_CONFIG_FILES(tests/golden/hid_bom1/Makefile) +AC_CONFIG_FILES(tests/golden/hid_bom2/Makefile) +AC_CONFIG_FILES(tests/golden/hid_bom3/Makefile) +AC_CONFIG_FILES(tests/golden/hid_bom4/Makefile) +AC_CONFIG_FILES(tests/golden/hid_gcode1/Makefile) +AC_CONFIG_FILES(tests/golden/hid_gcode2/Makefile) +AC_CONFIG_FILES(tests/golden/hid_gcode3/Makefile) +AC_CONFIG_FILES(tests/golden/hid_gcode4/Makefile) +AC_CONFIG_FILES(tests/golden/hid_gcode5/Makefile) +AC_CONFIG_FILES(tests/golden/hid_gcode6/Makefile) +AC_CONFIG_FILES(tests/golden/hid_gcode7/Makefile) +AC_CONFIG_FILES(tests/golden/hid_gcode8/Makefile) +AC_CONFIG_FILES(tests/golden/hid_gcode9/Makefile) +AC_CONFIG_FILES(tests/golden/hid_gcode10/Makefile) +AC_CONFIG_FILES(tests/golden/hid_gcode11/Makefile) +AC_CONFIG_FILES(tests/golden/hid_gerber1/Makefile) +AC_CONFIG_FILES(tests/golden/hid_gerber2/Makefile) +AC_CONFIG_FILES(tests/golden/hid_gerber3/Makefile) +AC_CONFIG_FILES(tests/golden/hid_png1/Makefile) +AC_CONFIG_FILES(tests/golden/hid_png2/Makefile) +AC_CONFIG_FILES(tests/golden/hid_png3/Makefile) +AC_CONFIG_FILES(tests/Makefile) + +dnl GTS 0.7.6 - http://gts.sourceforge.net/ +AC_CONFIG_FILES(gts/Makefile) + +dnl win32 build scripts +AC_CONFIG_FILES(w32/Makefile) + +AC_OUTPUT + +with_gui=`echo $with_gui` +with_printer=`echo $with_printer` +with_exporters=`echo $with_exporters | sed 's/,/ /g'` + +expandedXDGDATADIR=`eval "echo $XDGDATADIR"` +expandedKDEDATADIR=`eval "echo $KDEDATADIR"` + +AC_MSG_RESULT([ +** Configuration summary for $PACKAGE $VERSION: + + GUI: $with_gui + Printer: $with_printer + Exporters: $with_exporters + Coordinate type: $COORD_TYPE + Source tree distribution: $pcb_sources + Build documentation: $docs_yesno + Build toporouter: $enable_toporouter + Enable toporouter output: $enable_toporouter_output + xdg data directory: $expandedXDGDATADIR + KDE data directory: $expandedKDEDATADIR + dmalloc debugging: $with_dmalloc + ElectricFence debugging: $with_efence + + Cross Compiling: $cross_compiling + CC: $CC + CXX: $CXX + CPPFLAGS: $CPPFLAGS + CFLAGS: $CFLAGS + CXXFLAGS: $CXXFLAGS + LIBS: $LIBS + PCB: $PCB + +]) Index: trunk/.pc/fix_pan_action.diff/po/POTFILES.skip =================================================================== Index: trunk/.pc/fix_pan_action.diff/src/hid/gtk/gtkhid-main.c =================================================================== --- trunk/.pc/fix_pan_action.diff/src/hid/gtk/gtkhid-main.c (nonexistent) +++ trunk/.pc/fix_pan_action.diff/src/hid/gtk/gtkhid-main.c (revision 4) @@ -0,0 +1,2190 @@ +/* $Id$ */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include +#ifdef HAVE_STRING_H +#include +#endif +#include +#include + + +#include "action.h" +#include "crosshair.h" +#include "error.h" +#include "../hidint.h" +#include "gui.h" +#include "hid/common/hidnogui.h" +#include "hid/common/draw_helpers.h" +#include "pcb-printf.h" + +#ifdef HAVE_LIBDMALLOC +#include +#endif + + +RCSID ("$Id$"); + + +static void +pan_common (GHidPort *port) +{ + int event_x, event_y; + + /* We need to fix up the PCB coordinates corresponding to the last + * event so convert it back to event coordinates temporarily. */ + ghid_pcb_to_event_coords (gport->pcb_x, gport->pcb_y, &event_x, &event_y); + + /* Don't pan so far the board is completely off the screen */ + port->view.x0 = MAX (-port->view.width, port->view.x0); + port->view.y0 = MAX (-port->view.height, port->view.y0); + port->view.x0 = MIN ( port->view.x0, PCB->MaxWidth); + port->view.y0 = MIN ( port->view.y0, PCB->MaxHeight); + + /* Fix up noted event coordinates to match where we clamped. Alternatively + * we could call ghid_note_event_location (NULL); to get a new pointer + * location, but this costs us an xserver round-trip (on X11 platforms) + */ + ghid_event_to_pcb_coords (event_x, event_y, &gport->pcb_x, &gport->pcb_y); + + ghidgui->adjustment_changed_holdoff = TRUE; + gtk_range_set_value (GTK_RANGE (ghidgui->h_range), gport->view.x0); + gtk_range_set_value (GTK_RANGE (ghidgui->v_range), gport->view.y0); + ghidgui->adjustment_changed_holdoff = FALSE; + + ghid_port_ranges_changed(); +} + +static void +ghid_pan_view_abs (Coord pcb_x, Coord pcb_y, int widget_x, int widget_y) +{ + gport->view.x0 = SIDE_X (pcb_x) - widget_x * gport->view.coord_per_px; + gport->view.y0 = SIDE_Y (pcb_y) - widget_y * gport->view.coord_per_px; + + pan_common (gport); +} + +void +ghid_pan_view_rel (Coord dx, Coord dy) +{ + gport->view.x0 += dx; + gport->view.y0 += dy; + + pan_common (gport); +} + + +/* gport->view.coord_per_px: + * zoom value is PCB units per screen pixel. Larger numbers mean zooming + * out - the largest value means you are looking at the whole board. + * + * gport->view_width and gport->view_height are in PCB coordinates + */ + +#define ALLOW_ZOOM_OUT_BY 10 /* Arbitrary, and same as the lesstif HID */ +static void +ghid_zoom_view_abs (Coord center_x, Coord center_y, double new_zoom) +{ + double min_zoom, max_zoom; + double xtmp, ytmp; + + /* Limit the "minimum" zoom constant (maximum zoom), at 1 pixel per PCB + * unit, and set the "maximum" zoom constant (minimum zoom), such that + * the entire board just fits inside the viewport + */ + min_zoom = 1; + max_zoom = MAX (PCB->MaxWidth / gport->width, + PCB->MaxHeight / gport->height) * ALLOW_ZOOM_OUT_BY; + new_zoom = MIN (MAX (min_zoom, new_zoom), max_zoom); + + if (gport->view.coord_per_px == new_zoom) + return; + + xtmp = (SIDE_X (center_x) - gport->view.x0) / (double)gport->view.width; + ytmp = (SIDE_Y (center_y) - gport->view.y0) / (double)gport->view.height; + + gport->view.coord_per_px = new_zoom; + pixel_slop = new_zoom; + ghid_port_ranges_scale (); + + gport->view.x0 = SIDE_X (center_x) - xtmp * gport->view.width; + gport->view.y0 = SIDE_Y (center_y) - ytmp * gport->view.height; + + pan_common (gport); + + ghid_set_status_line_label (); +} + +static void +ghid_zoom_view_rel (Coord center_x, Coord center_y, double factor) +{ + ghid_zoom_view_abs (center_x, center_y, gport->view.coord_per_px * factor); +} + +static void +ghid_zoom_view_fit (void) +{ + ghid_pan_view_abs (SIDE_X (0), SIDE_Y (0), 0, 0); + ghid_zoom_view_abs (SIDE_X (0), SIDE_Y (0), + MAX (PCB->MaxWidth / gport->width, + PCB->MaxHeight / gport->height)); +} + +static void +ghid_flip_view (Coord center_x, Coord center_y, bool flip_x, bool flip_y) +{ + int widget_x, widget_y; + + /* Work out where on the screen the flip point is */ + ghid_pcb_to_event_coords (center_x, center_y, &widget_x, &widget_y); + + gport->view.flip_x = gport->view.flip_x != flip_x; + gport->view.flip_y = gport->view.flip_y != flip_y; + + /* Pan the board so the center location remains in the same place */ + ghid_pan_view_abs (center_x, center_y, widget_x, widget_y); + + ghid_invalidate_all (); +} + +/* ------------------------------------------------------------ */ + +static const char zoom_syntax[] = +"Zoom()\n" +"Zoom(factor)"; + + +static const char zoom_help[] = +N_("Various zoom factor changes."); + +/* %start-doc actions Zoom +Changes the zoom (magnification) of the view of the board. If no +arguments are passed, the view is scaled such that the board just fits +inside the visible window (i.e. ``view all''). Otherwise, +@var{factor} specifies a change in zoom factor. It may be prefixed by +@code{+}, @code{-}, or @code{=} to change how the zoom factor is +modified. The @var{factor} is a floating point number, such as +@code{1.5} or @code{0.75}. + +@table @code + +@item +@var{factor} +Values greater than 1.0 cause the board to be drawn smaller; more of +the board will be visible. Values between 0.0 and 1.0 cause the board +to be drawn bigger; less of the board will be visible. + +@item -@var{factor} +Values greater than 1.0 cause the board to be drawn bigger; less of +the board will be visible. Values between 0.0 and 1.0 cause the board +to be drawn smaller; more of the board will be visible. + +@item =@var{factor} + +The @var{factor} is an absolute zoom factor; the unit for this value +is "PCB units per screen pixel". Since PCB units are 0.01 mil, a +@var{factor} of 1000 means 10 mils (0.01 in) per pixel, or 100 DPI, +about the actual resolution of most screens - resulting in an "actual +size" board. Similarly, a @var{factor} of 100 gives you a 10x actual +size. + +@end table + +Note that zoom factors of zero are silently ignored. + + + +%end-doc */ + +static int +Zoom (int argc, char **argv, Coord x, Coord y) +{ + const char *vp; + double v; + + if (argc > 1) + AFAIL (zoom); + + if (argc < 1) + { + ghid_zoom_view_fit (); + return 0; + } + + vp = argv[0]; + if (*vp == '+' || *vp == '-' || *vp == '=') + vp++; + v = g_ascii_strtod (vp, 0); + if (v <= 0) + return 1; + switch (argv[0][0]) + { + case '-': + ghid_zoom_view_rel (x, y, 1 / v); + break; + default: + case '+': + ghid_zoom_view_rel (x, y, v); + break; + case '=': + ghid_zoom_view_abs (x, y, v); + break; + } + + return 0; +} + +/* ------------------------------------------------------------ */ + +void +ghid_calibrate (double xval, double yval) +{ + printf (_("ghid_calibrate() -- not implemented\n")); +} + +static int ghid_gui_is_up = 0; + +void +ghid_notify_gui_is_up () +{ + ghid_gui_is_up = 1; +} + +int +ghid_shift_is_pressed () +{ + GdkModifierType mask; + GHidPort *out = &ghid_port; + + if( ! ghid_gui_is_up ) + return 0; + + gdk_window_get_pointer (gtk_widget_get_window (out->drawing_area), + NULL, NULL, &mask); + return (mask & GDK_SHIFT_MASK) ? TRUE : FALSE; +} + +int +ghid_control_is_pressed () +{ + GdkModifierType mask; + GHidPort *out = &ghid_port; + + if( ! ghid_gui_is_up ) + return 0; + + gdk_window_get_pointer (gtk_widget_get_window (out->drawing_area), + NULL, NULL, &mask); + return (mask & GDK_CONTROL_MASK) ? TRUE : FALSE; +} + +int +ghid_mod1_is_pressed () +{ + GdkModifierType mask; + GHidPort *out = &ghid_port; + + if( ! ghid_gui_is_up ) + return 0; + + gdk_window_get_pointer (gtk_widget_get_window (out->drawing_area), + NULL, NULL, &mask); +#ifdef __APPLE__ + return (mask & ( 1 << 13 ) ) ? TRUE : FALSE; // The option key is not MOD1, although it should be... +#else + return (mask & GDK_MOD1_MASK) ? TRUE : FALSE; +#endif +} + +void +ghid_set_crosshair (int x, int y, int action) +{ + GdkDisplay *display; + GdkScreen *screen; + int offset_x, offset_y; + int widget_x, widget_y; + int pointer_x, pointer_y; + Coord pcb_x, pcb_y; + + if (gport->crosshair_x != x || gport->crosshair_y != y) + { + ghid_set_cursor_position_labels (); + gport->crosshair_x = x; + gport->crosshair_y = y; + + /* FIXME - does this trigger the idle_proc stuff? It is in the + * lesstif HID. Maybe something is needed here? + * + * need_idle_proc (); + */ + } + + if (action != HID_SC_PAN_VIEWPORT && + action != HID_SC_WARP_POINTER) + return; + + /* Find out where the drawing area is on the screen. gdk_display_get_pointer + * and gdk_display_warp_pointer work relative to the whole display, whilst + * our coordinates are relative to the drawing area origin. + */ + gdk_window_get_origin (gtk_widget_get_window (gport->drawing_area), + &offset_x, &offset_y); + display = gdk_display_get_default (); + + switch (action) { + case HID_SC_PAN_VIEWPORT: + /* Pan the board in the viewport so that the crosshair (who's location + * relative on the board was set above) lands where the pointer is. + * We pass the request to pan a particular point on the board to a + * given widget coordinate of the viewport into the rendering code + */ + + /* Find out where the pointer is relative to the display */ + gdk_display_get_pointer (display, NULL, &pointer_x, &pointer_y, NULL); + + widget_x = pointer_x - offset_x; + widget_y = pointer_y - offset_y; + + ghid_event_to_pcb_coords (widget_x, widget_y, &pcb_x, &pcb_y); + ghid_pan_view_abs (pcb_x, pcb_y, widget_x, widget_y); + + /* Just in case we couldn't pan the board the whole way, + * we warp the pointer to where the crosshair DID land. + */ + /* Fall through */ + + case HID_SC_WARP_POINTER: + screen = gdk_display_get_default_screen (display); + + ghid_pcb_to_event_coords (x, y, &widget_x, &widget_y); + + pointer_x = offset_x + widget_x; + pointer_y = offset_y + widget_y; + + gdk_display_warp_pointer (display, screen, pointer_x, pointer_y); + + break; + } +} + +typedef struct +{ + void (*func) (hidval); + guint id; + hidval user_data; +} +GuiTimer; + + /* We need a wrapper around the hid timer because a gtk timer needs + | to return FALSE else the timer will be restarted. + */ +static gboolean +ghid_timer (GuiTimer * timer) +{ + (*timer->func) (timer->user_data); + ghid_mode_cursor (Settings.Mode); + return FALSE; /* Turns timer off */ +} + +hidval +ghid_add_timer (void (*func) (hidval user_data), + unsigned long milliseconds, hidval user_data) +{ + GuiTimer *timer = g_new0 (GuiTimer, 1); + hidval ret; + + timer->func = func; + timer->user_data = user_data; + timer->id = g_timeout_add (milliseconds, (GSourceFunc) ghid_timer, timer); + ret.ptr = (void *) timer; + return ret; +} + +void +ghid_stop_timer (hidval timer) +{ + void *ptr = timer.ptr; + + g_source_remove (((GuiTimer *) ptr)->id); + g_free( ptr ); +} + +typedef struct +{ + void (*func) ( hidval, int, unsigned int, hidval ); + hidval user_data; + int fd; + GIOChannel *channel; + gint id; +} +GuiWatch; + + /* We need a wrapper around the hid file watch to pass the correct flags + */ +static gboolean +ghid_watch (GIOChannel *source, GIOCondition condition, gpointer data) +{ + unsigned int pcb_condition = 0; + hidval x; + GuiWatch *watch = (GuiWatch*)data; + + if (condition & G_IO_IN) + pcb_condition |= PCB_WATCH_READABLE; + if (condition & G_IO_OUT) + pcb_condition |= PCB_WATCH_WRITABLE; + if (condition & G_IO_ERR) + pcb_condition |= PCB_WATCH_ERROR; + if (condition & G_IO_HUP) + pcb_condition |= PCB_WATCH_HANGUP; + + x.ptr = (void *) watch; + watch->func (x, watch->fd, pcb_condition, watch->user_data); + ghid_mode_cursor (Settings.Mode); + + return TRUE; /* Leave watch on */ +} + +hidval +ghid_watch_file (int fd, unsigned int condition, void (*func) (hidval watch, int fd, unsigned int condition, hidval user_data), + hidval user_data) +{ + GuiWatch *watch = g_new0 (GuiWatch, 1); + hidval ret; + unsigned int glib_condition = 0; + + if (condition & PCB_WATCH_READABLE) + glib_condition |= G_IO_IN; + if (condition & PCB_WATCH_WRITABLE) + glib_condition |= G_IO_OUT; + if (condition & PCB_WATCH_ERROR) + glib_condition |= G_IO_ERR; + if (condition & PCB_WATCH_HANGUP) + glib_condition |= G_IO_HUP; + + watch->func = func; + watch->user_data = user_data; + watch->fd = fd; + watch->channel = g_io_channel_unix_new( fd ); + watch->id = g_io_add_watch( watch->channel, (GIOCondition)glib_condition, ghid_watch, watch ); + + ret.ptr = (void *) watch; + return ret; +} + +void +ghid_unwatch_file (hidval data) +{ + GuiWatch *watch = (GuiWatch*)data.ptr; + + g_io_channel_shutdown( watch->channel, TRUE, NULL ); + g_io_channel_unref( watch->channel ); + g_free( watch ); +} + +typedef struct +{ + GSource source; + void (*func) (hidval user_data); + hidval user_data; +} BlockHookSource; + +static gboolean ghid_block_hook_prepare (GSource *source, + gint *timeout); +static gboolean ghid_block_hook_check (GSource *source); +static gboolean ghid_block_hook_dispatch (GSource *source, + GSourceFunc callback, + gpointer user_data); + +static GSourceFuncs ghid_block_hook_funcs = { + ghid_block_hook_prepare, + ghid_block_hook_check, + ghid_block_hook_dispatch, + NULL // No destroy notification +}; + +static gboolean +ghid_block_hook_prepare (GSource *source, + gint *timeout) +{ + hidval data = ((BlockHookSource *)source)->user_data; + ((BlockHookSource *)source)->func( data ); + return FALSE; +} + +static gboolean +ghid_block_hook_check (GSource *source) +{ + return FALSE; +} + +static gboolean +ghid_block_hook_dispatch (GSource *source, + GSourceFunc callback, + gpointer user_data) +{ + return FALSE; +} + +static hidval +ghid_add_block_hook (void (*func) (hidval data), + hidval user_data) +{ + hidval ret; + BlockHookSource *source; + + source = (BlockHookSource *)g_source_new (&ghid_block_hook_funcs, sizeof( BlockHookSource )); + + source->func = func; + source->user_data = user_data; + + g_source_attach ((GSource *)source, NULL); + + ret.ptr = (void *) source; + return ret; +} + +static void +ghid_stop_block_hook (hidval mlpoll) +{ + GSource *source = (GSource *)mlpoll.ptr; + g_source_destroy( source ); +} + +int +ghid_confirm_dialog (char *msg, ...) +{ + int rv = 0; + va_list ap; + char *cancelmsg = NULL, *okmsg = NULL; + static gint x = -1, y = -1; + GtkWidget *dialog; + GHidPort *out = &ghid_port; + + va_start (ap, msg); + cancelmsg = va_arg (ap, char *); + okmsg = va_arg (ap, char *); + va_end (ap); + + if (!cancelmsg) + { + cancelmsg = _("_Cancel"); + okmsg = _("_OK"); + } + + dialog = gtk_message_dialog_new (GTK_WINDOW (out->top_window), + (GtkDialogFlags) (GTK_DIALOG_MODAL | + GTK_DIALOG_DESTROY_WITH_PARENT), + GTK_MESSAGE_QUESTION, + GTK_BUTTONS_NONE, + "%s", msg); + gtk_dialog_add_button (GTK_DIALOG (dialog), + cancelmsg, GTK_RESPONSE_CANCEL); + if (okmsg) + { + gtk_dialog_add_button (GTK_DIALOG (dialog), + okmsg, GTK_RESPONSE_OK); + } + + if(x != -1) { + gtk_window_move(GTK_WINDOW (dialog), x, y); + } + + if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_OK) + rv = 1; + + gtk_window_get_position(GTK_WINDOW (dialog), &x, &y); + + gtk_widget_destroy (dialog); + return rv; +} + +int +ghid_close_confirm_dialog () +{ + switch (ghid_dialog_close_confirm ()) + { + case GUI_DIALOG_CLOSE_CONFIRM_SAVE: + { + if (hid_actionl ("Save", NULL)) + { /* Save failed */ + return 0; /* Cancel */ + } else { + return 1; /* Close */ + } + } + case GUI_DIALOG_CLOSE_CONFIRM_NOSAVE: + { + return 1; /* Close */ + } + case GUI_DIALOG_CLOSE_CONFIRM_CANCEL: + default: + { + return 0; /* Cancel */ + } + } +} + +void +ghid_report_dialog (char *title, char *msg) +{ + ghid_dialog_report (title, msg); +} + +char * +ghid_prompt_for (const char *msg, const char *default_string) +{ + char *rv; + + rv = ghid_dialog_input (msg, default_string); + return rv; +} + +/* FIXME -- implement a proper file select dialog */ +#ifdef FIXME +char * +ghid_fileselect (const char *title, const char *descr, + char *default_file, char *default_ext, + const char *history_tag, int flags) +{ + char *rv; + + rv = ghid_dialog_input (title, default_file); + return rv; +} +#endif + +void +ghid_show_item (void *item) +{ + ghid_pinout_window_show (&ghid_port, (ElementTypePtr) item); +} + +void +ghid_beep () +{ + gdk_beep (); +} + +struct progress_dialog +{ + GtkWidget *dialog; + GtkWidget *message; + GtkWidget *progress; + gint response_id; + GMainLoop *loop; + gboolean destroyed; + gboolean started; + GTimer *timer; + + gulong response_handler; + gulong destroy_handler; + gulong delete_handler; +}; + +static void +run_response_handler (GtkDialog *dialog, + gint response_id, + gpointer data) +{ + struct progress_dialog *pd = data; + + pd->response_id = response_id; +} + +static gint +run_delete_handler (GtkDialog *dialog, + GdkEventAny *event, + gpointer data) +{ + struct progress_dialog *pd = data; + + pd->response_id = GTK_RESPONSE_DELETE_EVENT; + + return TRUE; /* Do not destroy */ +} + +static void +run_destroy_handler (GtkDialog *dialog, gpointer data) +{ + struct progress_dialog *pd = data; + + pd->destroyed = TRUE; +} + +static struct progress_dialog * +make_progress_dialog (void) +{ + struct progress_dialog *pd; + GtkWidget *content_area; + GtkWidget *alignment; + GtkWidget *vbox; + + pd = g_new0 (struct progress_dialog, 1); + pd->response_id = GTK_RESPONSE_NONE; + + pd->dialog = gtk_dialog_new_with_buttons (_("Progress"), + GTK_WINDOW (gport->top_window), + /* Modal so nothing else can get events whilst + the main mainloop isn't running */ + GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_STOCK_CANCEL, + GTK_RESPONSE_CANCEL, + NULL); + + gtk_window_set_deletable (GTK_WINDOW (pd->dialog), FALSE); + gtk_window_set_skip_pager_hint (GTK_WINDOW (pd->dialog), TRUE); + gtk_window_set_skip_taskbar_hint (GTK_WINDOW (pd->dialog), TRUE); + gtk_widget_set_size_request (pd->dialog, 300, -1); + + pd->message = gtk_label_new (NULL); + gtk_misc_set_alignment (GTK_MISC (pd->message), 0., 0.); + + pd->progress = gtk_progress_bar_new (); + gtk_widget_set_size_request (pd->progress, -1, 26); + + vbox = gtk_vbox_new (false, 0); + gtk_box_pack_start (GTK_BOX (vbox), pd->message, true, true, 8); + gtk_box_pack_start (GTK_BOX (vbox), pd->progress, false, true, 8); + + alignment = gtk_alignment_new (0., 0., 1., 1.); + gtk_alignment_set_padding (GTK_ALIGNMENT (alignment), 8, 8, 8, 8); + gtk_container_add (GTK_CONTAINER (alignment), vbox); + + content_area = gtk_dialog_get_content_area (GTK_DIALOG (pd->dialog)); + gtk_box_pack_start (GTK_BOX (content_area), alignment, true, true, 0); + + gtk_widget_show_all (alignment); + + g_object_ref (pd->dialog); + gtk_window_present (GTK_WINDOW (pd->dialog)); + + pd->response_handler = + g_signal_connect (pd->dialog, "response", + G_CALLBACK (run_response_handler), pd); + pd->delete_handler = + g_signal_connect (pd->dialog, "delete-event", + G_CALLBACK (run_delete_handler), pd); + pd->destroy_handler = + g_signal_connect (pd->dialog, "destroy", + G_CALLBACK (run_destroy_handler), pd); + + pd->loop = g_main_loop_new (NULL, FALSE); + pd->timer = g_timer_new (); + + return pd; +} + +static void +destroy_progress_dialog (struct progress_dialog *pd) +{ + if (pd == NULL) + return; + + if (!pd->destroyed) + { + g_signal_handler_disconnect (pd->dialog, pd->response_handler); + g_signal_handler_disconnect (pd->dialog, pd->delete_handler); + g_signal_handler_disconnect (pd->dialog, pd->destroy_handler); + } + + g_timer_destroy (pd->timer); + g_object_unref (pd->dialog); + g_main_loop_unref (pd->loop); + + gtk_widget_destroy (pd->dialog); + + pd->loop = NULL; + g_free (pd); +} + +static void +handle_progress_dialog_events (struct progress_dialog *pd) +{ + GMainContext * context = g_main_loop_get_context (pd->loop); + + /* Process events */ + while (g_main_context_pending (context)) + { + g_main_context_iteration (context, FALSE); + } +} + +#define MIN_TIME_SEPARATION (50./1000.) /* 50ms */ +static int +ghid_progress (int so_far, int total, const char *message) +{ + static struct progress_dialog *pd = NULL; + + /* If we are finished, destroy any dialog */ + if (so_far == 0 && total == 0 && message == NULL) + { + destroy_progress_dialog (pd); + pd = NULL; + return 0; + } + + if (pd == NULL) + pd = make_progress_dialog (); + + /* We don't want to keep the underlying process too busy whilst we + * process events. If we get called quickly after the last progress + * update, wait a little bit before we respond - perhaps the next + * time progress is reported. + + * The exception here is that we always want to process the first + * batch of events after having shown the dialog for the first time + */ + if (pd->started && g_timer_elapsed (pd->timer, NULL) < MIN_TIME_SEPARATION) + return 0; + + gtk_label_set_text (GTK_LABEL (pd->message), message); + gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (pd->progress), + (double)so_far / (double)total); + + handle_progress_dialog_events (pd); + g_timer_start (pd->timer); + + pd->started = TRUE; + + return (pd->response_id == GTK_RESPONSE_CANCEL || + pd->response_id == GTK_RESPONSE_DELETE_EVENT) ? 1 : 0; +} + +/* ---------------------------------------------------------------------- */ + + +typedef struct { + GtkWidget *del; + GtkWidget *w_name; + GtkWidget *w_value; +} AttrRow; + +static AttrRow *attr_row = 0; +static int attr_num_rows = 0; +static int attr_max_rows = 0; +static AttributeListType *attributes_list; +static GtkWidget *attributes_dialog, *attr_table; + +static void attributes_delete_callback (GtkWidget *w, void *v); + +#define GA_RESPONSE_REVERT 1 +#define GA_RESPONSE_NEW 2 + +static void +ghid_attr_set_table_size () +{ + gtk_table_resize (GTK_TABLE (attr_table), attr_num_rows > 0 ? attr_num_rows : 1, 3); +} + +static void +ghid_attributes_need_rows (int new_max) +{ + if (attr_max_rows < new_max) + { + if (attr_row) + attr_row = (AttrRow *) realloc (attr_row, new_max * sizeof(AttrRow)); + else + attr_row = (AttrRow *) malloc (new_max * sizeof(AttrRow)); + } + while (attr_max_rows < new_max) + { + /* add [attr_max_rows] */ + attr_row[attr_max_rows].del = gtk_button_new_with_label ("del"); + gtk_table_attach (GTK_TABLE (attr_table), attr_row[attr_max_rows].del, + 0, 1, + attr_max_rows, attr_max_rows+1, + (GtkAttachOptions)(GTK_FILL | GTK_EXPAND), + GTK_FILL, + 0, 0); + g_signal_connect (G_OBJECT (attr_row[attr_max_rows].del), "clicked", + G_CALLBACK (attributes_delete_callback), GINT_TO_POINTER (attr_max_rows) ); + + attr_row[attr_max_rows].w_name = gtk_entry_new (); + gtk_table_attach (GTK_TABLE (attr_table), attr_row[attr_max_rows].w_name, + 1, 2, + attr_max_rows, attr_max_rows+1, + (GtkAttachOptions)(GTK_FILL | GTK_EXPAND), + GTK_FILL, + 0, 0); + + attr_row[attr_max_rows].w_value = gtk_entry_new (); + gtk_table_attach (GTK_TABLE (attr_table), attr_row[attr_max_rows].w_value, + 2, 3, + attr_max_rows, attr_max_rows+1, + (GtkAttachOptions)(GTK_FILL | GTK_EXPAND), + GTK_FILL, + 0, 0); + + attr_max_rows ++; + } + + /* Manage any previously unused rows we now need to show. */ + while (attr_num_rows < new_max) + { + /* manage attr_num_rows */ + gtk_widget_show (attr_row[attr_num_rows].del); + gtk_widget_show (attr_row[attr_num_rows].w_name); + gtk_widget_show (attr_row[attr_num_rows].w_value); + attr_num_rows ++; + } +} + +static void +ghid_attributes_revert () +{ + int i; + + ghid_attributes_need_rows (attributes_list->Number); + + /* Unmanage any previously used rows we don't need. */ + while (attr_num_rows > attributes_list->Number) + { + attr_num_rows --; + gtk_widget_hide (attr_row[attr_num_rows].del); + gtk_widget_hide (attr_row[attr_num_rows].w_name); + gtk_widget_hide (attr_row[attr_num_rows].w_value); + } + + /* Fill in values */ + for (i=0; iNumber; i++) + { + /* create row [i] */ + gtk_entry_set_text (GTK_ENTRY (attr_row[i].w_name), attributes_list->List[i].name); + gtk_entry_set_text (GTK_ENTRY (attr_row[i].w_value), attributes_list->List[i].value); +#if 0 +#endif + } + ghid_attr_set_table_size (); +} + +static void +attributes_delete_callback (GtkWidget *w, void *v) +{ + int i, n; + + n = GPOINTER_TO_INT (v); + + for (i=n; iNumber, 3, 0); + + content_area = gtk_dialog_get_content_area (GTK_DIALOG (attributes_dialog)); + gtk_box_pack_start (GTK_BOX (content_area), attr_table, FALSE, FALSE, 0); + + gtk_widget_show (attr_table); + + ghid_attributes_revert (); + + while (1) + { + response = gtk_dialog_run (GTK_DIALOG (attributes_dialog)); + + if (response == GTK_RESPONSE_CANCEL) + break; + + if (response == GTK_RESPONSE_OK) + { + int i; + /* Copy the values back */ + for (i=0; iNumber; i++) + { + if (attributes_list->List[i].name) + free (attributes_list->List[i].name); + if (attributes_list->List[i].value) + free (attributes_list->List[i].value); + } + if (attributes_list->Max < attr_num_rows) + { + int sz = attr_num_rows * sizeof (AttributeType); + if (attributes_list->List == NULL) + attributes_list->List = (AttributeType *) malloc (sz); + else + attributes_list->List = (AttributeType *) realloc (attributes_list->List, sz); + attributes_list->Max = attr_num_rows; + } + for (i=0; iList[i].name = strdup (gtk_entry_get_text (GTK_ENTRY (attr_row[i].w_name))); + attributes_list->List[i].value = strdup (gtk_entry_get_text (GTK_ENTRY (attr_row[i].w_value))); + attributes_list->Number = attr_num_rows; + } + + break; + } + + if (response == GA_RESPONSE_REVERT) + { + /* Revert */ + ghid_attributes_revert (); + } + + if (response == GA_RESPONSE_NEW) + { + ghid_attributes_need_rows (attr_num_rows + 1); /* also bumps attr_num_rows */ + + gtk_entry_set_text (GTK_ENTRY (attr_row[attr_num_rows-1].w_name), ""); + gtk_entry_set_text (GTK_ENTRY (attr_row[attr_num_rows-1].w_value), ""); + + ghid_attr_set_table_size (); + } + } + + gtk_widget_destroy (attributes_dialog); + free (attr_row); + attr_row = NULL; +} + +/* ---------------------------------------------------------------------- */ + +HID_DRC_GUI ghid_drc_gui = { + 1, /* log_drc_overview */ + 0, /* log_drc_details */ + ghid_drc_window_reset_message, + ghid_drc_window_append_violation, + ghid_drc_window_throw_dialog, +}; + +extern HID_Attribute *ghid_get_export_options (int *); + + +/* ------------------------------------------------------------ + * + * Actions specific to the GTK HID follow from here + * + */ + + +/* ------------------------------------------------------------ */ +static const char about_syntax[] = +"About()"; + +static const char about_help[] = +N_("Tell the user about this version of PCB."); + +/* %start-doc actions About + +This just pops up a dialog telling the user which version of +@code{pcb} they're running. + +%end-doc */ + + +static int +About (int argc, char **argv, Coord x, Coord y) +{ + ghid_dialog_about (); + return 0; +} + +/* ------------------------------------------------------------ */ +static const char getxy_syntax[] = +"GetXY()"; + +static const char getxy_help[] = +N_("Get a coordinate."); + +/* %start-doc actions GetXY + +Prompts the user for a coordinate, if one is not already selected. + +%end-doc */ + +static int +GetXY (int argc, char **argv, Coord x, Coord y) +{ + return 0; +} + +/* ---------------------------------------------------------------------- */ + +static int PointCursor (int argc, char **argv, Coord x, Coord y) +{ + if (!ghidgui) + return 0; + + if (argc > 0) + ghid_point_cursor (); + else + ghid_mode_cursor (Settings.Mode); + return 0; +} + +/* ---------------------------------------------------------------------- */ + +static int +RouteStylesChanged (int argc, char **argv, Coord x, Coord y) +{ + if (!ghidgui || !ghidgui->route_style_selector) + return 0; + + ghid_route_style_selector_sync + (GHID_ROUTE_STYLE_SELECTOR (ghidgui->route_style_selector), + Settings.LineThickness, Settings.ViaDrillingHole, + Settings.ViaThickness, Settings.Keepaway); + + return 0; +} + +/* ---------------------------------------------------------------------- */ + +int +PCBChanged (int argc, char **argv, Coord x, Coord y) +{ + if (!ghidgui) + return 0; + + ghid_window_set_name_label (PCB->Name); + + if (!gport->pixmap) + return 0; + + if (ghidgui->route_style_selector) + { + ghid_route_style_selector_empty + (GHID_ROUTE_STYLE_SELECTOR (ghidgui->route_style_selector)); + make_route_style_buttons + (GHID_ROUTE_STYLE_SELECTOR (ghidgui->route_style_selector)); + } + RouteStylesChanged (0, NULL, 0, 0); + + ghid_port_ranges_scale (); + ghid_zoom_view_fit (); + ghid_sync_with_new_layout (); + return 0; +} + +/* ---------------------------------------------------------------------- */ + +static int +LayerGroupsChanged (int argc, char **argv, Coord x, Coord y) +{ + printf (_("LayerGroupsChanged -- not implemented\n")); + return 0; +} + +/* ---------------------------------------------------------------------- */ + +static int +LibraryChanged (int argc, char **argv, Coord x, Coord y) +{ + /* No need to show the library window every time it changes... + * ghid_library_window_show (&ghid_port, FALSE); + */ + return 0; +} + +/* ---------------------------------------------------------------------- */ + +static int +Command (int argc, char **argv, Coord x, Coord y) +{ + ghid_handle_user_command (TRUE); + return 0; +} + +/* ---------------------------------------------------------------------- */ + +static int +Load (int argc, char **argv, Coord x, Coord y) +{ + char *function; + char *name = NULL; + + static gchar *current_element_dir = NULL; + static gchar *current_layout_dir = NULL; + static gchar *current_netlist_dir = NULL; + + /* we've been given the file name */ + if (argc > 1) + return hid_actionv ("LoadFrom", argc, argv); + + function = argc ? argv[0] : (char *)"Layout"; + + if (strcasecmp (function, "Netlist") == 0) + { + name = ghid_dialog_file_select_open (_("Load netlist file"), + ¤t_netlist_dir, + Settings.FilePath); + } + else if (strcasecmp (function, "ElementToBuffer") == 0) + { + name = ghid_dialog_file_select_open (_("Load element to buffer"), + ¤t_element_dir, + Settings.LibraryTree); + } + else if (strcasecmp (function, "LayoutToBuffer") == 0) + { + name = ghid_dialog_file_select_open (_("Load layout file to buffer"), + ¤t_layout_dir, + Settings.FilePath); + } + else if (strcasecmp (function, "Layout") == 0) + { + name = ghid_dialog_file_select_open (_("Load layout file"), + ¤t_layout_dir, + Settings.FilePath); + } + + if (name) + { + if (Settings.verbose) + fprintf (stderr, "%s: Calling LoadFrom(%s, %s)\n", __FUNCTION__, + function, name); + hid_actionl ("LoadFrom", function, name, NULL); + g_free (name); + } + + return 0; +} + + +/* ---------------------------------------------------------------------- */ +static const char save_syntax[] = +"Save()\n" +"Save(Layout|LayoutAs)\n" +"Save(AllConnections|AllUnusedPins|ElementConnections)\n" +"Save(PasteBuffer)"; + +static const char save_help[] = +N_("Save layout and/or element data to a user-selected file."); + +/* %start-doc actions Save + +This action is a GUI front-end to the core's @code{SaveTo} action +(@pxref{SaveTo Action}). If you happen to pass a filename, like +@code{SaveTo}, then @code{SaveTo} is called directly. Else, the +user is prompted for a filename to save, and then @code{SaveTo} is +called with that filename. + +%end-doc */ + +static int +Save (int argc, char **argv, Coord x, Coord y) +{ + char *function; + char *name; + char *prompt; + + static gchar *current_dir = NULL; + + if (argc > 1) + return hid_actionv ("SaveTo", argc, argv); + + function = argc ? argv[0] : (char *)"Layout"; + + if (strcasecmp (function, "Layout") == 0) + if (PCB->Filename) + return hid_actionl ("SaveTo", "Layout", PCB->Filename, NULL); + + if (strcasecmp (function, "PasteBuffer") == 0) + prompt = _("Save element as"); + else + prompt = _("Save layout as"); + + name = ghid_dialog_file_select_save (prompt, + ¤t_dir, + PCB->Filename, Settings.FilePath); + + if (name) + { + if (Settings.verbose) + fprintf (stderr, "%s: Calling SaveTo(%s, %s)\n", + __FUNCTION__, function, name); + + if (strcasecmp (function, "PasteBuffer") == 0) + hid_actionl ("PasteBuffer", "Save", name, NULL); + else + { + /* + * if we got this far and the function is Layout, then + * we really needed it to be a LayoutAs. Otherwise + * ActionSaveTo() will ignore the new file name we + * just obtained. + */ + if (strcasecmp (function, "Layout") == 0) + hid_actionl ("SaveTo", "LayoutAs", name, NULL); + else + hid_actionl ("SaveTo", function, name, NULL); + } + g_free (name); + } + else + { + return 1; + } + + return 0; +} + +/* ---------------------------------------------------------------------- */ +static const char swapsides_syntax[] = +"SwapSides(|v|h|r)"; + +static const char swapsides_help[] = +N_("Swaps the side of the board you're looking at."); + +/* %start-doc actions SwapSides + +This action changes the way you view the board. + +@table @code + +@item v +Flips the board over vertically (up/down). + +@item h +Flips the board over horizontally (left/right), like flipping pages in +a book. + +@item r +Rotates the board 180 degrees without changing sides. + +@end table + +If no argument is given, the board isn't moved but the opposite side +is shown. + +Normally, this action changes which pads and silk layer are drawn as +true silk, and which are drawn as the "invisible" layer. It also +determines which solder mask you see. + +As a special case, if the layer group for the side you're looking at +is visible and currently active, and the layer group for the opposite +is not visible (i.e. disabled), then this action will also swap which +layer group is visible and active, effectively swapping the ``working +side'' of the board. + +%end-doc */ + + +static int +SwapSides (int argc, char **argv, Coord x, Coord y) +{ + int active_group = GetLayerGroupNumberByNumber (LayerStack[0]); + int comp_group = GetLayerGroupNumberByNumber (component_silk_layer); + int solder_group = GetLayerGroupNumberByNumber (solder_silk_layer); + bool comp_on = LAYER_PTR (PCB->LayerGroups.Entries[comp_group][0])->On; + bool solder_on = LAYER_PTR (PCB->LayerGroups.Entries[solder_group][0])->On; + + if (argc > 0) + { + switch (argv[0][0]) { + case 'h': + case 'H': + ghid_flip_view (gport->pcb_x, gport->pcb_y, true, false); + break; + case 'v': + case 'V': + ghid_flip_view (gport->pcb_x, gport->pcb_y, false, true); + break; + case 'r': + case 'R': + ghid_flip_view (gport->pcb_x, gport->pcb_y, true, true); + Settings.ShowSolderSide = !Settings.ShowSolderSide; /* Swapped back below */ + break; + default: + return 1; + } + } + + Settings.ShowSolderSide = !Settings.ShowSolderSide; + + if ((active_group == comp_group && comp_on && !solder_on) || + (active_group == solder_group && solder_on && !comp_on)) + { + bool new_solder_vis = Settings.ShowSolderSide; + + ChangeGroupVisibility (PCB->LayerGroups.Entries[comp_group][0], + !new_solder_vis, !new_solder_vis); + ChangeGroupVisibility (PCB->LayerGroups.Entries[solder_group][0], + new_solder_vis, new_solder_vis); + } + + return 0; +} + +/* ------------------------------------------------------------ */ + +static const char print_syntax[] = +"Print()"; + +static const char print_help[] = +N_("Print the layout."); + +/* %start-doc actions Print + +This will find the default printing HID, prompt the user for its +options, and print the layout. + +%end-doc */ + +static int +Print (int argc, char **argv, Coord x, Coord y) +{ + HID **hids; + int i; + HID *printer = NULL; + + hids = hid_enumerate (); + for (i = 0; hids[i]; i++) + { + if (hids[i]->printer) + printer = hids[i]; + } + + if (printer == NULL) + { + gui->log (_("Can't find a suitable printer HID")); + return -1; + } + + /* check if layout is empty */ + if (!IsDataEmpty (PCB->Data)) + { + ghid_dialog_print (printer); + } + else + gui->log (_("Can't print empty layout")); + + return 0; +} + + +/* ------------------------------------------------------------ */ + +static HID_Attribute +printer_calibrate_attrs[] = { + {N_("Enter Values here:"), "", + HID_Label, 0, 0, {0, 0, 0}, 0, 0}, + {N_("x-calibration"), N_("X scale for calibrating your printer"), + HID_Real, 0.5, 25, {0, 0, 1.00}, 0, 0}, + {N_("y-calibration"), N_("Y scale for calibrating your printer"), + HID_Real, 0.5, 25, {0, 0, 1.00}, 0, 0} +}; +static HID_Attr_Val printer_calibrate_values[3]; + +static const char printcalibrate_syntax[] = +"PrintCalibrate()"; + +static const char printcalibrate_help[] = +N_("Calibrate the printer."); + +/* %start-doc actions PrintCalibrate + +This will print a calibration page, which you would measure and type +the measurements in, so that future printouts will be more precise. + +%end-doc */ + +static int +PrintCalibrate (int argc, char **argv, Coord x, Coord y) +{ + HID *printer = hid_find_printer (); + printer->calibrate (0.0, 0.0); + + if (gui->attribute_dialog (printer_calibrate_attrs, 3, + printer_calibrate_values, + _("Printer Calibration Values"), + _("Enter calibration values for your printer"))) + return 1; + printer->calibrate (printer_calibrate_values[1].real_value, + printer_calibrate_values[2].real_value); + return 0; +} + +/* ------------------------------------------------------------ */ + +static int +Export (int argc, char **argv, Coord x, Coord y) +{ + + /* check if layout is empty */ + if (!IsDataEmpty (PCB->Data)) + { + ghid_dialog_export (); + } + else + gui->log (_("Can't export empty layout")); + + return 0; +} + +/* ------------------------------------------------------------ */ + +static int +Benchmark (int argc, char **argv, Coord x, Coord y) +{ + int i = 0; + time_t start, end; + GdkDisplay *display; + + display = gdk_drawable_get_display (gport->drawable); + + gdk_display_sync (display); + time (&start); + do + { + ghid_invalidate_all (); + gdk_window_process_updates (gtk_widget_get_window (gport->drawing_area), + FALSE); + time (&end); + i++; + } + while (end - start < 10); + + printf (_("%g redraws per second\n"), i / 10.0); + + return 0; +} + +/* ------------------------------------------------------------ */ + +static const char center_syntax[] = +"Center()\n"; + +static const char center_help[] = +N_("Moves the pointer to the center of the window."); + +/* %start-doc actions Center + +Move the pointer to the center of the window, but only if it's +currently within the window already. + +%end-doc */ + +static int +Center(int argc, char **argv, Coord pcb_x, Coord pcb_y) +{ + GdkDisplay *display; + GdkScreen *screen; + int offset_x, offset_y; + int widget_x, widget_y; + int pointer_x, pointer_y; + + if (argc != 0) + AFAIL (center); + + /* Aim to put the given x, y PCB coordinates in the center of the widget */ + widget_x = gport->width / 2; + widget_y = gport->height / 2; + + ghid_pan_view_abs (pcb_x, pcb_y, widget_x, widget_y); + + /* Now move the mouse pointer to the place where the board location + * actually ended up. + * + * XXX: Should only do this if we confirm we are inside our window? + */ + + ghid_pcb_to_event_coords (pcb_x, pcb_y, &widget_x, &widget_y); + gdk_window_get_origin (gtk_widget_get_window (gport->drawing_area), + &offset_x, &offset_y); + + pointer_x = offset_x + widget_x; + pointer_y = offset_y + widget_y; + + display = gdk_display_get_default (); + screen = gdk_display_get_default_screen (display); + gdk_display_warp_pointer (display, screen, pointer_x, pointer_y); + + return 0; +} + +/* ------------------------------------------------------------ */ +static const char cursor_syntax[] = +"Cursor(Type,DeltaUp,DeltaRight,Units)"; + +static const char cursor_help[] = +N_("Move the cursor."); + +/* %start-doc actions Cursor + +This action moves the mouse cursor. Unlike other actions which take +coordinates, this action's coordinates are always relative to the +user's view of the board. Thus, a positive @var{DeltaUp} may move the +cursor towards the board origin if the board is inverted. + +Type is one of @samp{Pan} or @samp{Warp}. @samp{Pan} causes the +viewport to move such that the crosshair is under the mouse cursor. +@samp{Warp} causes the mouse cursor to move to be above the crosshair. + +@var{Units} can be one of the following: + +@table @samp + +@item mil +@itemx mm +The cursor is moved by that amount, in board units. + +@item grid +The cursor is moved by that many grid points. + +@item view +The values are percentages of the viewport's view. Thus, a pan of +@samp{100} would scroll the viewport by exactly the width of the +current view. + +@item board +The values are percentages of the board size. Thus, a move of +@samp{50,50} moves you halfway across the board. + +@end table + +%end-doc */ + +static int +CursorAction(int argc, char **argv, Coord x, Coord y) +{ + UnitList extra_units_x = { + { "grid", PCB->Grid, 0 }, + { "view", gport->view.width, UNIT_PERCENT }, + { "board", PCB->MaxWidth, UNIT_PERCENT }, + { "", 0, 0 } + }; + UnitList extra_units_y = { + { "grid", PCB->Grid, 0 }, + { "view", gport->view.height, UNIT_PERCENT }, + { "board", PCB->MaxHeight, UNIT_PERCENT }, + { "", 0, 0 } + }; + int pan_warp = HID_SC_DO_NOTHING; + double dx, dy; + + if (argc != 4) + AFAIL (cursor); + + if (strcasecmp (argv[0], "pan") == 0) + pan_warp = HID_SC_PAN_VIEWPORT; + else if (strcasecmp (argv[0], "warp") == 0) + pan_warp = HID_SC_WARP_POINTER; + else + AFAIL (cursor); + + dx = GetValueEx (argv[1], argv[3], NULL, extra_units_x, ""); + if (gport->view.flip_x) + dx = -dx; + dy = GetValueEx (argv[2], argv[3], NULL, extra_units_y, ""); + if (!gport->view.flip_y) + dy = -dy; + + EventMoveCrosshair (Crosshair.X + dx, Crosshair.Y + dy); + gui->set_crosshair (Crosshair.X, Crosshair.Y, pan_warp); + + return 0; +} +/* ------------------------------------------------------------ */ + +static const char dowindows_syntax[] = +"DoWindows(1|2|3|4|5|6)\n" +"DoWindows(Layout|Library|Log|Netlist|Preferences|DRC)"; + +static const char dowindows_help[] = +N_("Open various GUI windows."); + +/* %start-doc actions DoWindows + +@table @code + +@item 1 +@itemx Layout +Open the layout window. Since the layout window is always shown +anyway, this has no effect. + +@item 2 +@itemx Library +Open the library window. + +@item 3 +@itemx Log +Open the log window. + +@item 4 +@itemx Netlist +Open the netlist window. + +@item 5 +@itemx Preferences +Open the preferences window. + +@item 6 +@itemx DRC +Open the DRC violations window. + +@end table + +%end-doc */ + +static int +DoWindows (int argc, char **argv, Coord x, Coord y) +{ + char *a = argc == 1 ? argv[0] : (char *)""; + + if (strcmp (a, "1") == 0 || strcasecmp (a, "Layout") == 0) + { + } + else if (strcmp (a, "2") == 0 || strcasecmp (a, "Library") == 0) + { + ghid_library_window_show (gport, TRUE); + } + else if (strcmp (a, "3") == 0 || strcasecmp (a, "Log") == 0) + { + ghid_log_window_show (TRUE); + } + else if (strcmp (a, "4") == 0 || strcasecmp (a, "Netlist") == 0) + { + ghid_netlist_window_show (gport, TRUE); + } + else if (strcmp (a, "5") == 0 || strcasecmp (a, "Preferences") == 0) + { + ghid_config_window_show (); + } + else if (strcmp (a, "6") == 0 || strcasecmp (a, "DRC") == 0) + { + ghid_drc_window_show (TRUE); + } + else + { + AFAIL (dowindows); + } + + return 0; +} + +/* ------------------------------------------------------------ */ +static const char setunits_syntax[] = +"SetUnits(mm|mil)"; + +static const char setunits_help[] = +N_("Set the default measurement units."); + +/* %start-doc actions SetUnits + +@table @code + +@item mil +Sets the display units to mils (1/1000 inch). + +@item mm +Sets the display units to millimeters. + +@end table + +%end-doc */ + +static int +SetUnits (int argc, char **argv, Coord x, Coord y) +{ + const Unit *new_unit; + if (argc == 0) + return 0; + + new_unit = get_unit_struct (argv[0]); + if (new_unit != NULL && new_unit->allow != NO_PRINT) + { + Settings.grid_unit = new_unit; + Settings.increments = get_increments_struct (Settings.grid_unit->suffix); + AttributePut (PCB, "PCB::grid::unit", argv[0]); + } + + ghid_config_handle_units_changed (); + + ghid_set_status_line_label (); + + /* FIXME ? + * lesstif_sizes_reset (); + * lesstif_styles_update_values (); + */ + return 0; +} + +/* ------------------------------------------------------------ */ +static const char scroll_syntax[] = +"Scroll(up|down|left|right, [div])"; + +static const char scroll_help[] = +N_("Scroll the viewport."); + +/* % start-doc actions Scroll + +@item up|down|left|right +Specifies the direction to scroll + +@item div +Optional. Specifies how much to scroll by. The viewport is scrolled +by 1/div of what is visible, so div = 1 scrolls a whole page. If not +default is given, div=40. + +%end-doc */ + +static int +ScrollAction (int argc, char **argv, Coord x, Coord y) +{ + gdouble dx = 0.0, dy = 0.0; + int div = 40; + + if (!ghidgui) + return 0; + + if (argc != 1 && argc != 2) + AFAIL (scroll); + + if (argc == 2) + div = atoi(argv[1]); + + if (strcasecmp (argv[0], "up") == 0) + dy = -gport->view.height / div; + else if (strcasecmp (argv[0], "down") == 0) + dy = gport->view.height / div; + else if (strcasecmp (argv[0], "right") == 0) + dx = gport->view.width / div; + else if (strcasecmp (argv[0], "left") == 0) + dx = -gport->view.width / div; + else + AFAIL (scroll); + + ghid_pan_view_rel (dx, dy); + + return 0; +} + +/* ------------------------------------------------------------ */ +static const char pan_syntax[] = +"Pan([thumb], Mode)"; + +static const char pan_help[] = +N_("Start or stop panning (Mode = 1 to start, 0 to stop)\n" +"Optional thumb argument is ignored for now in gtk hid.\n"); + +/* %start-doc actions Pan + +Start or stop panning. To start call with Mode = 1, to stop call with +Mode = 0. + +%end-doc */ + +static int +PanAction (int argc, char **argv, Coord x, Coord y) +{ + int mode; + + if (!ghidgui) + return 0; + + if (argc != 1 && argc != 2) + AFAIL (pan); + + if (argc == 1) + mode = atoi(argv[0]); + else + { + mode = atoi(argv[1]); + Message (_("The gtk gui currently ignores the optional first argument " + "to the Pan action.\nFeel free to provide patches.\n")); + } + + gport->panning = mode; + + return 0; +} + +/* ------------------------------------------------------------ */ +static const char popup_syntax[] = +"Popup(MenuName, [Button])"; + +static const char popup_help[] = +N_("Bring up the popup menu specified by @code{MenuName}.\n" +"If called by a mouse event then the mouse button number\n" +"must be specified as the optional second argument."); + +/* %start-doc actions Popup + +This just pops up the specified menu. The menu must have been defined +as a named subresource of the Popups resource in the menu resource +file. + +%end-doc */ + + +static int +Popup (int argc, char **argv, Coord x, Coord y) +{ + GtkMenu *menu; + + if (argc != 1 && argc != 2) + AFAIL (popup); + + menu = ghid_main_menu_get_popup (GHID_MAIN_MENU (ghidgui->menu_bar), argv[0]); + if (! GTK_IS_MENU (menu)) + { + Message (_("The specified popup menu \"%s\" has not been defined.\n"), argv[0]); + return 1; + } + else + { + ghidgui->in_popup = TRUE; + gtk_widget_grab_focus (ghid_port.drawing_area); + gtk_menu_popup (menu, NULL, NULL, NULL, NULL, 0, + gtk_get_current_event_time()); + } + return 0; +} +/* ------------------------------------------------------------ */ +static const char importgui_syntax[] = +"ImportGUI()"; + +static const char importgui_help[] = +N_("Asks user which schematics to import into PCB.\n"); + +/* %start-doc actions ImportGUI + +Asks user which schematics to import into PCB. + +%end-doc */ + + +static int +ImportGUI (int argc, char **argv, Coord x, Coord y) +{ + char *name = NULL; + static gchar *current_layout_dir = NULL; + static int I_am_recursing = 0; + int rv; + + if (I_am_recursing) + return 1; + + + name = ghid_dialog_file_select_open (_("Load schematics"), + ¤t_layout_dir, + Settings.FilePath); + +#ifdef DEBUG + printf("File selected = %s\n", name); +#endif + + AttributePut (PCB, "import::src0", name); + free (name); + + I_am_recursing = 1; + rv = hid_action ("Import"); + I_am_recursing = 0; + + return rv; +} + +/* ------------------------------------------------------------ */ +static int +Busy (int argc, char **argv, Coord x, Coord y) +{ + ghid_watch_cursor (); + return 0; +} + +HID_Action ghid_main_action_list[] = { + {"About", 0, About, about_help, about_syntax}, + {"Benchmark", 0, Benchmark}, + {"Busy", 0, Busy}, + {"Center", N_("Click on a location to center"), Center, center_help, center_syntax}, + {"Command", 0, Command}, + {"Cursor", 0, CursorAction, cursor_help, cursor_syntax}, + {"DoWindows", 0, DoWindows, dowindows_help, dowindows_syntax}, + {"Export", 0, Export}, + {"GetXY", "", GetXY, getxy_help, getxy_syntax}, + {"ImportGUI", 0, ImportGUI, importgui_help, importgui_syntax}, + {"LayerGroupsChanged", 0, LayerGroupsChanged}, + {"LibraryChanged", 0, LibraryChanged}, + {"Load", 0, Load}, + {"Pan", N_("Click on a place to pan"), PanAction, pan_help, pan_syntax}, + {"PCBChanged", 0, PCBChanged}, + {"PointCursor", 0, PointCursor}, + {"Popup", 0, Popup, popup_help, popup_syntax}, + {"Print", 0, Print, + print_help, print_syntax}, + {"PrintCalibrate", 0, PrintCalibrate, + printcalibrate_help, printcalibrate_syntax}, + {"RouteStylesChanged", 0, RouteStylesChanged}, + {"Save", 0, Save, save_help, save_syntax}, + {"Scroll", N_("Click on a place to scroll"), ScrollAction, scroll_help, scroll_syntax}, + {"SetUnits", 0, SetUnits, setunits_help, setunits_syntax}, + {"SwapSides", 0, SwapSides, swapsides_help, swapsides_syntax}, + {"Zoom", N_("Click on zoom focus"), Zoom, zoom_help, zoom_syntax} +}; + +REGISTER_ACTIONS (ghid_main_action_list) + + +static int +flag_flipx (int x) +{ + return gport->view.flip_x; +} + +static int +flag_flipy (int x) +{ + return gport->view.flip_y; +} + +HID_Flag ghid_main_flag_list[] = { + {"flip_x", flag_flipx, 0}, + {"flip_y", flag_flipy, 0} +}; + +REGISTER_FLAGS (ghid_main_flag_list) + +#include "dolists.h" + +/* + * We will need these for finding the windows installation + * directory. Without that we can't find our fonts and + * footprint libraries. + */ +#ifdef WIN32 +#include +#include +#endif + +HID ghid_hid; + +void +hid_gtk_init () +{ +#ifdef WIN32 + char * tmps; + char * share_dir; + char *loader_cache; + FILE *loader_file; +#endif + +#ifdef WIN32 + tmps = g_win32_get_package_installation_directory (PACKAGE "-" VERSION, NULL); +#define REST_OF_PATH G_DIR_SEPARATOR_S "share" G_DIR_SEPARATOR_S PACKAGE +#define REST_OF_CACHE G_DIR_SEPARATOR_S "loaders.cache" + share_dir = (char *) malloc(strlen(tmps) + + strlen(REST_OF_PATH) + + 1); + sprintf (share_dir, "%s%s", tmps, REST_OF_PATH); + + /* Point to our gdk-pixbuf loader cache. */ + loader_cache = (char *) malloc (strlen (bindir) + + strlen (REST_OF_CACHE) + + 1); + sprintf (loader_cache, "%s%s", bindir, REST_OF_CACHE); + loader_file = fopen (loader_cache, "r"); + if (loader_file) + { + fclose (loader_file); + g_setenv ("GDK_PIXBUF_MODULE_FILE", loader_cache, TRUE); + } + + free (tmps); +#undef REST_OF_PATH + printf ("\"Share\" installation path is \"%s\"\n", share_dir); +#endif + + memset (&ghid_hid, 0, sizeof (HID)); + + common_nogui_init (&ghid_hid); + common_draw_helpers_init (&ghid_hid); + + ghid_hid.struct_size = sizeof (HID); + ghid_hid.name = "gtk"; + ghid_hid.description = "Gtk - The Gimp Toolkit"; + ghid_hid.gui = 1; + ghid_hid.poly_after = 1; + + ghid_hid.get_export_options = ghid_get_export_options; + ghid_hid.do_export = ghid_do_export; + ghid_hid.parse_arguments = ghid_parse_arguments; + ghid_hid.invalidate_lr = ghid_invalidate_lr; + ghid_hid.invalidate_all = ghid_invalidate_all; + ghid_hid.notify_crosshair_change = ghid_notify_crosshair_change; + ghid_hid.notify_mark_change = ghid_notify_mark_change; + ghid_hid.set_layer = ghid_set_layer; + ghid_hid.make_gc = ghid_make_gc; + ghid_hid.destroy_gc = ghid_destroy_gc; + ghid_hid.use_mask = ghid_use_mask; + ghid_hid.set_color = ghid_set_color; + ghid_hid.set_line_cap = ghid_set_line_cap; + ghid_hid.set_line_width = ghid_set_line_width; + ghid_hid.set_draw_xor = ghid_set_draw_xor; + ghid_hid.draw_line = ghid_draw_line; + ghid_hid.draw_arc = ghid_draw_arc; + ghid_hid.draw_rect = ghid_draw_rect; + ghid_hid.fill_circle = ghid_fill_circle; + ghid_hid.fill_polygon = ghid_fill_polygon; + ghid_hid.fill_rect = ghid_fill_rect; + + ghid_hid.calibrate = ghid_calibrate; + ghid_hid.shift_is_pressed = ghid_shift_is_pressed; + ghid_hid.control_is_pressed = ghid_control_is_pressed; + ghid_hid.mod1_is_pressed = ghid_mod1_is_pressed, + ghid_hid.get_coords = ghid_get_coords; + ghid_hid.set_crosshair = ghid_set_crosshair; + ghid_hid.add_timer = ghid_add_timer; + ghid_hid.stop_timer = ghid_stop_timer; + ghid_hid.watch_file = ghid_watch_file; + ghid_hid.unwatch_file = ghid_unwatch_file; + ghid_hid.add_block_hook = ghid_add_block_hook; + ghid_hid.stop_block_hook = ghid_stop_block_hook; + + ghid_hid.log = ghid_log; + ghid_hid.logv = ghid_logv; + ghid_hid.confirm_dialog = ghid_confirm_dialog; + ghid_hid.close_confirm_dialog = ghid_close_confirm_dialog; + ghid_hid.report_dialog = ghid_report_dialog; + ghid_hid.prompt_for = ghid_prompt_for; + ghid_hid.fileselect = ghid_fileselect; + ghid_hid.attribute_dialog = ghid_attribute_dialog; + ghid_hid.show_item = ghid_show_item; + ghid_hid.beep = ghid_beep; + ghid_hid.progress = ghid_progress; + ghid_hid.drc_gui = &ghid_drc_gui, + ghid_hid.edit_attributes = ghid_attributes; + + ghid_hid.request_debug_draw = ghid_request_debug_draw; + ghid_hid.flush_debug_draw = ghid_flush_debug_draw; + ghid_hid.finish_debug_draw = ghid_finish_debug_draw; + + ghid_hid.notify_save_pcb = ghid_notify_save_pcb; + ghid_hid.notify_filename_changed = ghid_notify_filename_changed; + + hid_register_hid (&ghid_hid); +#include "gtk_lists.h" +} Index: trunk/.pc/fix_typo.diff/src/hid/common/hidgl.c =================================================================== --- trunk/.pc/fix_typo.diff/src/hid/common/hidgl.c (nonexistent) +++ trunk/.pc/fix_typo.diff/src/hid/common/hidgl.c (revision 4) @@ -0,0 +1,793 @@ +/* + * COPYRIGHT + * + * PCB, interactive printed circuit board design + * Copyright (C) 2009-2011 PCB Contributers (See ChangeLog for details) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include +#ifdef HAVE_STRING_H +#include +#endif +#include +#include + +/* The Linux OpenGL ABI 1.0 spec requires that we define + * GL_GLEXT_PROTOTYPES before including gl.h or glx.h for extensions + * in order to get prototypes: + * http://www.opengl.org/registry/ABI/ + */ +#define GL_GLEXT_PROTOTYPES 1 +#ifdef HAVE_OPENGL_GL_H +# include +#else +# include +#endif + +#ifdef HAVE_OPENGL_GLU_H +# include +#else +# include +#endif + +#include "action.h" +#include "crosshair.h" +#include "data.h" +#include "error.h" +#include "global.h" +#include "mymem.h" +#include "clip.h" + +#include "hid.h" +#include "hidgl.h" +#include "rtree.h" + +#ifdef HAVE_LIBDMALLOC +#include +#endif + + +triangle_buffer buffer; +float global_depth = 0; + +void +hidgl_init_triangle_array (triangle_buffer *buffer) +{ + buffer->triangle_count = 0; + buffer->coord_comp_count = 0; +} + +void +hidgl_flush_triangles (triangle_buffer *buffer) +{ + if (buffer->triangle_count == 0) + return; + + glEnableClientState (GL_VERTEX_ARRAY); + glVertexPointer (3, GL_FLOAT, 0, buffer->triangle_array); + glDrawArrays (GL_TRIANGLES, 0, buffer->triangle_count * 3); + glDisableClientState (GL_VERTEX_ARRAY); + + buffer->triangle_count = 0; + buffer->coord_comp_count = 0; +} + +void +hidgl_ensure_triangle_space (triangle_buffer *buffer, int count) +{ + if (count > TRIANGLE_ARRAY_SIZE) + { + fprintf (stderr, "Not enough space in vertex buffer\n"); + fprintf (stderr, "Requested %i triangles, %i available\n", + count, TRIANGLE_ARRAY_SIZE); + exit (1); + } + if (count > TRIANGLE_ARRAY_SIZE - buffer->triangle_count) + hidgl_flush_triangles (buffer); +} + +void +hidgl_set_depth (float depth) +{ + global_depth = depth; +} + +void +hidgl_draw_grid (BoxType *drawn_area) +{ + static GLfloat *points = 0; + static int npoints = 0; + Coord x1, y1, x2, y2, n, i; + double x, y; + + if (!Settings.DrawGrid) + return; + + x1 = GridFit (MAX (0, drawn_area->X1), PCB->Grid, PCB->GridOffsetX); + y1 = GridFit (MAX (0, drawn_area->Y1), PCB->Grid, PCB->GridOffsetY); + x2 = GridFit (MIN (PCB->MaxWidth, drawn_area->X2), PCB->Grid, PCB->GridOffsetX); + y2 = GridFit (MIN (PCB->MaxHeight, drawn_area->Y2), PCB->Grid, PCB->GridOffsetY); + + if (x1 > x2) + { + Coord tmp = x1; + x1 = x2; + x2 = tmp; + } + + if (y1 > y2) + { + Coord tmp = y1; + y1 = y2; + y2 = tmp; + } + + n = (int) ((x2 - x1) / PCB->Grid + 0.5) + 1; + if (n > npoints) + { + npoints = n + 10; + points = realloc (points, npoints * 3 * sizeof (GLfloat)); + } + + glEnableClientState (GL_VERTEX_ARRAY); + glVertexPointer (3, GL_FLOAT, 0, points); + + n = 0; + for (x = x1; x <= x2; x += PCB->Grid) + { + points[3 * n + 0] = x; + points[3 * n + 2] = global_depth; + n++; + } + for (y = y1; y <= y2; y += PCB->Grid) + { + for (i = 0; i < n; i++) + points[3 * i + 1] = y; + glDrawArrays (GL_POINTS, 0, n); + } + + glDisableClientState (GL_VERTEX_ARRAY); +} + +#define MAX_PIXELS_ARC_TO_CHORD 0.5 +#define MIN_SLICES 6 +int calc_slices (float pix_radius, float sweep_angle) +{ + float slices; + + if (pix_radius <= MAX_PIXELS_ARC_TO_CHORD) + return MIN_SLICES; + + slices = sweep_angle / acosf (1 - MAX_PIXELS_ARC_TO_CHORD / pix_radius) / 2.; + return (int)ceilf (slices); +} + +#define MIN_TRIANGLES_PER_CAP 3 +#define MAX_TRIANGLES_PER_CAP 90 +static void draw_cap (Coord width, Coord x, Coord y, Angle angle, double scale) +{ + float last_capx, last_capy; + float capx, capy; + float radius = width / 2.; + int slices = calc_slices (radius / scale, M_PI); + int i; + + if (slices < MIN_TRIANGLES_PER_CAP) + slices = MIN_TRIANGLES_PER_CAP; + + if (slices > MAX_TRIANGLES_PER_CAP) + slices = MAX_TRIANGLES_PER_CAP; + + hidgl_ensure_triangle_space (&buffer, slices); + + last_capx = radius * cosf (angle * M_PI / 180.) + x; + last_capy = -radius * sinf (angle * M_PI / 180.) + y; + for (i = 0; i < slices; i++) { + capx = radius * cosf (angle * M_PI / 180. + ((float)(i + 1)) * M_PI / (float)slices) + x; + capy = -radius * sinf (angle * M_PI / 180. + ((float)(i + 1)) * M_PI / (float)slices) + y; + hidgl_add_triangle (&buffer, last_capx, last_capy, capx, capy, x, y); + last_capx = capx; + last_capy = capy; + } +} + +void +hidgl_draw_line (int cap, Coord width, Coord x1, Coord y1, Coord x2, Coord y2, double scale) +{ + double angle; + float deltax, deltay, length; + float wdx, wdy; + int circular_caps = 0; + int hairline = 0; + + if (width == 0.0) + hairline = 1; + + if (width < scale) + width = scale; + + deltax = x2 - x1; + deltay = y2 - y1; + + length = sqrt (deltax * deltax + deltay * deltay); + + if (length == 0) { + /* Assume the orientation of the line is horizontal */ + angle = 0; + wdx = -width / 2.; + wdy = 0; + length = 1.; + deltax = 1.; + deltay = 0.; + } else { + wdy = deltax * width / 2. / length; + wdx = -deltay * width / 2. / length; + + if (deltay == 0.) + angle = (deltax < 0) ? 270. : 90.; + else + angle = 180. / M_PI * atanl (deltax / deltay); + + if (deltay < 0) + angle += 180.; + } + + switch (cap) { + case Trace_Cap: + case Round_Cap: + circular_caps = 1; + break; + + case Square_Cap: + case Beveled_Cap: + x1 -= deltax * width / 2. / length; + y1 -= deltay * width / 2. / length; + x2 += deltax * width / 2. / length; + y2 += deltay * width / 2. / length; + break; + } + + hidgl_ensure_triangle_space (&buffer, 2); + hidgl_add_triangle (&buffer, x1 - wdx, y1 - wdy, + x2 - wdx, y2 - wdy, + x2 + wdx, y2 + wdy); + hidgl_add_triangle (&buffer, x1 - wdx, y1 - wdy, + x2 + wdx, y2 + wdy, + x1 + wdx, y1 + wdy); + + /* Don't bother capping hairlines */ + if (circular_caps && !hairline) + { + draw_cap (width, x1, y1, angle, scale); + draw_cap (width, x2, y2, angle + 180., scale); + } +} + +#define MIN_SLICES_PER_ARC 6 +#define MAX_SLICES_PER_ARC 360 +void +hidgl_draw_arc (Coord width, Coord x, Coord y, Coord rx, Coord ry, + Angle start_angle, Angle delta_angle, double scale) +{ + float last_inner_x, last_inner_y; + float last_outer_x, last_outer_y; + float inner_x, inner_y; + float outer_x, outer_y; + float inner_r; + float outer_r; + float cos_ang, sin_ang; + float start_angle_rad; + float delta_angle_rad; + float angle_incr_rad; + int slices; + int i; + int hairline = 0; + + if (width == 0.0) + hairline = 1; + + if (width < scale) + width = scale; + + inner_r = rx - width / 2.; + outer_r = rx + width / 2.; + + if (delta_angle < 0) { + start_angle += delta_angle; + delta_angle = - delta_angle; + } + + start_angle_rad = start_angle * M_PI / 180.; + delta_angle_rad = delta_angle * M_PI / 180.; + + slices = calc_slices ((rx + width / 2.) / scale, delta_angle_rad); + + if (slices < MIN_SLICES_PER_ARC) + slices = MIN_SLICES_PER_ARC; + + if (slices > MAX_SLICES_PER_ARC) + slices = MAX_SLICES_PER_ARC; + + hidgl_ensure_triangle_space (&buffer, 2 * slices); + + angle_incr_rad = delta_angle_rad / (float)slices; + + cos_ang = cosf (start_angle_rad); + sin_ang = sinf (start_angle_rad); + last_inner_x = -inner_r * cos_ang + x; last_inner_y = inner_r * sin_ang + y; + last_outer_x = -outer_r * cos_ang + x; last_outer_y = outer_r * sin_ang + y; + for (i = 1; i <= slices; i++) { + cos_ang = cosf (start_angle_rad + ((float)(i)) * angle_incr_rad); + sin_ang = sinf (start_angle_rad + ((float)(i)) * angle_incr_rad); + inner_x = -inner_r * cos_ang + x; inner_y = inner_r * sin_ang + y; + outer_x = -outer_r * cos_ang + x; outer_y = outer_r * sin_ang + y; + hidgl_add_triangle (&buffer, last_inner_x, last_inner_y, + last_outer_x, last_outer_y, + outer_x, outer_y); + hidgl_add_triangle (&buffer, last_inner_x, last_inner_y, + inner_x, inner_y, + outer_x, outer_y); + last_inner_x = inner_x; last_inner_y = inner_y; + last_outer_x = outer_x; last_outer_y = outer_y; + } + + /* Don't bother capping hairlines */ + if (hairline) + return; + + draw_cap (width, x + rx * -cosf (start_angle_rad), + y + rx * sinf (start_angle_rad), + start_angle, scale); + draw_cap (width, x + rx * -cosf (start_angle_rad + delta_angle_rad), + y + rx * sinf (start_angle_rad + delta_angle_rad), + start_angle + delta_angle + 180., scale); +} + +void +hidgl_draw_rect (Coord x1, Coord y1, Coord x2, Coord y2) +{ + glBegin (GL_LINE_LOOP); + glVertex3f (x1, y1, global_depth); + glVertex3f (x1, y2, global_depth); + glVertex3f (x2, y2, global_depth); + glVertex3f (x2, y1, global_depth); + glEnd (); +} + + +void +hidgl_fill_circle (Coord vx, Coord vy, Coord vr, double scale) +{ +#define MIN_TRIANGLES_PER_CIRCLE 6 +#define MAX_TRIANGLES_PER_CIRCLE 360 + float last_x, last_y; + float radius = vr; + int slices; + int i; + + slices = calc_slices (vr / scale, 2 * M_PI); + + if (slices < MIN_TRIANGLES_PER_CIRCLE) + slices = MIN_TRIANGLES_PER_CIRCLE; + + if (slices > MAX_TRIANGLES_PER_CIRCLE) + slices = MAX_TRIANGLES_PER_CIRCLE; + + hidgl_ensure_triangle_space (&buffer, slices); + + last_x = vx + vr; + last_y = vy; + + for (i = 0; i < slices; i++) { + float x, y; + x = radius * cosf (((float)(i + 1)) * 2. * M_PI / (float)slices) + vx; + y = radius * sinf (((float)(i + 1)) * 2. * M_PI / (float)slices) + vy; + hidgl_add_triangle (&buffer, vx, vy, last_x, last_y, x, y); + last_x = x; + last_y = y; + } +} + +#define MAX_COMBINED_MALLOCS 2500 +static void *combined_to_free [MAX_COMBINED_MALLOCS]; +static int combined_num_to_free = 0; + +static GLenum tessVertexType; +static int stashed_vertices; +static int triangle_comp_idx; + + +static void +myError (GLenum errno) +{ + printf ("gluTess error: %s\n", gluErrorString (errno)); +} + +static void +myFreeCombined () +{ + while (combined_num_to_free) + free (combined_to_free [-- combined_num_to_free]); +} + +static void +myCombine ( GLdouble coords[3], void *vertex_data[4], GLfloat weight[4], void **dataOut ) +{ +#define MAX_COMBINED_VERTICES 2500 + static GLdouble combined_vertices [3 * MAX_COMBINED_VERTICES]; + static int num_combined_vertices = 0; + + GLdouble *new_vertex; + + if (num_combined_vertices < MAX_COMBINED_VERTICES) + { + new_vertex = &combined_vertices [3 * num_combined_vertices]; + num_combined_vertices ++; + } + else + { + new_vertex = malloc (3 * sizeof (GLdouble)); + + if (combined_num_to_free < MAX_COMBINED_MALLOCS) + combined_to_free [combined_num_to_free ++] = new_vertex; + else + printf ("myCombine leaking %lu bytes of memory\n", 3 * sizeof (GLdouble)); + } + + new_vertex[0] = coords[0]; + new_vertex[1] = coords[1]; + new_vertex[2] = coords[2]; + + *dataOut = new_vertex; +} + +static void +myBegin (GLenum type) +{ + tessVertexType = type; + stashed_vertices = 0; + triangle_comp_idx = 0; +} + +static double global_scale; + +static void +myVertex (GLdouble *vertex_data) +{ + static GLfloat triangle_vertices [2 * 3]; + + if (tessVertexType == GL_TRIANGLE_STRIP || + tessVertexType == GL_TRIANGLE_FAN) + { + if (stashed_vertices < 2) + { + triangle_vertices [triangle_comp_idx ++] = vertex_data [0]; + triangle_vertices [triangle_comp_idx ++] = vertex_data [1]; + stashed_vertices ++; + } + else + { + hidgl_ensure_triangle_space (&buffer, 1); + hidgl_add_triangle (&buffer, + triangle_vertices [0], triangle_vertices [1], + triangle_vertices [2], triangle_vertices [3], + vertex_data [0], vertex_data [1]); + + if (tessVertexType == GL_TRIANGLE_STRIP) + { + /* STRIP saves the last two vertices for re-use in the next triangle */ + triangle_vertices [0] = triangle_vertices [2]; + triangle_vertices [1] = triangle_vertices [3]; + } + /* Both FAN and STRIP save the last vertex for re-use in the next triangle */ + triangle_vertices [2] = vertex_data [0]; + triangle_vertices [3] = vertex_data [1]; + } + } + else if (tessVertexType == GL_TRIANGLES) + { + triangle_vertices [triangle_comp_idx ++] = vertex_data [0]; + triangle_vertices [triangle_comp_idx ++] = vertex_data [1]; + stashed_vertices ++; + if (stashed_vertices == 3) + { + hidgl_ensure_triangle_space (&buffer, 1); + hidgl_add_triangle (&buffer, + triangle_vertices [0], triangle_vertices [1], + triangle_vertices [2], triangle_vertices [3], + triangle_vertices [4], triangle_vertices [5]); + triangle_comp_idx = 0; + stashed_vertices = 0; + } + } + else + printf ("Vertex recieved with unknown type\n"); +} + +void +hidgl_fill_polygon (int n_coords, Coord *x, Coord *y) +{ + int i; + GLUtesselator *tobj; + GLdouble *vertices; + + assert (n_coords > 0); + + vertices = malloc (sizeof(GLdouble) * n_coords * 3); + + tobj = gluNewTess (); + gluTessCallback(tobj, GLU_TESS_BEGIN, (_GLUfuncptr)myBegin); + gluTessCallback(tobj, GLU_TESS_VERTEX, (_GLUfuncptr)myVertex); + gluTessCallback(tobj, GLU_TESS_COMBINE, (_GLUfuncptr)myCombine); + gluTessCallback(tobj, GLU_TESS_ERROR, (_GLUfuncptr)myError); + + gluTessBeginPolygon (tobj, NULL); + gluTessBeginContour (tobj); + + for (i = 0; i < n_coords; i++) + { + vertices [0 + i * 3] = x[i]; + vertices [1 + i * 3] = y[i]; + vertices [2 + i * 3] = 0.; + gluTessVertex (tobj, &vertices [i * 3], &vertices [i * 3]); + } + + gluTessEndContour (tobj); + gluTessEndPolygon (tobj); + gluDeleteTess (tobj); + + myFreeCombined (); + free (vertices); +} + +void +tesselate_contour (GLUtesselator *tobj, PLINE *contour, GLdouble *vertices, + double scale) +{ + VNODE *vn = &contour->head; + int offset = 0; + + /* If the contour is round, and hidgl_fill_circle would use + * less slices than we have vertices to draw it, then call + * hidgl_fill_circle to draw this contour. + */ + if (contour->is_round) { + double slices = calc_slices (contour->radius / scale, 2 * M_PI); + if (slices < contour->Count) { + hidgl_fill_circle (contour->cx, contour->cy, contour->radius, scale); + return; + } + } + + gluTessBeginPolygon (tobj, NULL); + gluTessBeginContour (tobj); + do { + vertices [0 + offset] = vn->point[0]; + vertices [1 + offset] = vn->point[1]; + vertices [2 + offset] = 0.; + gluTessVertex (tobj, &vertices [offset], &vertices [offset]); + offset += 3; + } while ((vn = vn->next) != &contour->head); + gluTessEndContour (tobj); + gluTessEndPolygon (tobj); +} + +struct do_hole_info { + GLUtesselator *tobj; + GLdouble *vertices; + double scale; +}; + +static int +do_hole (const BoxType *b, void *cl) +{ + struct do_hole_info *info = cl; + PLINE *curc = (PLINE *) b; + + /* Ignore the outer contour - we draw it first explicitly*/ + if (curc->Flags.orient == PLF_DIR) { + return 0; + } + + tesselate_contour (info->tobj, curc, info->vertices, info->scale); + return 1; +} + +static GLint stencil_bits; +static int dirty_bits = 0; +static int assigned_bits = 0; + +/* FIXME: JUST DRAWS THE FIRST PIECE.. TODO: SUPPORT FOR FULLPOLY POLYGONS */ +void +hidgl_fill_pcb_polygon (PolygonType *poly, const BoxType *clip_box, double scale) +{ + int vertex_count = 0; + PLINE *contour; + struct do_hole_info info; + int stencil_bit; + + info.scale = scale; + global_scale = scale; + + if (poly->Clipped == NULL) + { + fprintf (stderr, "hidgl_fill_pcb_polygon: poly->Clipped == NULL\n"); + return; + } + + stencil_bit = hidgl_assign_clear_stencil_bit (); + if (!stencil_bit) + { + printf ("hidgl_fill_pcb_polygon: No free stencil bits, aborting polygon\n"); + return; + } + + /* Flush out any existing geoemtry to be rendered */ + hidgl_flush_triangles (&buffer); + + /* Walk the polygon structure, counting vertices */ + /* This gives an upper bound on the amount of storage required */ + for (contour = poly->Clipped->contours; + contour != NULL; contour = contour->next) + vertex_count = MAX (vertex_count, contour->Count); + + info.vertices = malloc (sizeof(GLdouble) * vertex_count * 3); + info.tobj = gluNewTess (); + gluTessCallback(info.tobj, GLU_TESS_BEGIN, (_GLUfuncptr)myBegin); + gluTessCallback(info.tobj, GLU_TESS_VERTEX, (_GLUfuncptr)myVertex); + gluTessCallback(info.tobj, GLU_TESS_COMBINE, (_GLUfuncptr)myCombine); + gluTessCallback(info.tobj, GLU_TESS_ERROR, (_GLUfuncptr)myError); + + glPushAttrib (GL_STENCIL_BUFFER_BIT); /* Save the write mask etc.. for final restore */ + glEnable (GL_STENCIL_TEST); + glPushAttrib (GL_STENCIL_BUFFER_BIT | /* Resave the stencil write-mask etc.., and */ + GL_COLOR_BUFFER_BIT); /* the colour buffer write mask etc.. for part way restore */ + glStencilMask (stencil_bit); /* Only write to our stencil bit */ + glStencilFunc (GL_ALWAYS, stencil_bit, stencil_bit); /* Always pass stencil test, ref value is our bit */ + glColorMask (0, 0, 0, 0); /* Disable writting in color buffer */ + + glStencilOp (GL_KEEP, GL_KEEP, GL_REPLACE); /* Stencil pass => replace stencil value */ + + /* Drawing operations now set our reference bit in the stencil buffer */ + + r_search (poly->Clipped->contour_tree, clip_box, NULL, do_hole, &info); + hidgl_flush_triangles (&buffer); + + glPopAttrib (); /* Restore the colour and stencil buffer write-mask etc.. */ + + glStencilOp (GL_KEEP, GL_KEEP, GL_INVERT); /* This allows us to toggle the bit on any subcompositing bitplane */ + /* If the stencil test has passed, we know that bit is 0, so we're */ + /* effectively just setting it to 1. */ + + glStencilFunc (GL_GEQUAL, 0, assigned_bits); /* Pass stencil test if all assigned bits clear, */ + /* reference is all assigned bits so we set */ + /* any bits permitted by the stencil writemask */ + + /* Drawing operations as masked to areas where the stencil buffer is '0' */ + + /* Draw the polygon outer */ + tesselate_contour (info.tobj, poly->Clipped->contours, info.vertices, scale); + hidgl_flush_triangles (&buffer); + + /* Unassign our stencil buffer bit */ + hidgl_return_stencil_bit (stencil_bit); + + glPopAttrib (); /* Restore the stencil buffer write-mask etc.. */ + + gluDeleteTess (info.tobj); + myFreeCombined (); + free (info.vertices); +} + +void +hidgl_fill_rect (Coord x1, Coord y1, Coord x2, Coord y2) +{ + hidgl_ensure_triangle_space (&buffer, 2); + hidgl_add_triangle (&buffer, x1, y1, x1, y2, x2, y2); + hidgl_add_triangle (&buffer, x2, y1, x2, y2, x1, y1); +} + +void +hidgl_init (void) +{ + glGetIntegerv (GL_STENCIL_BITS, &stencil_bits); + + if (stencil_bits == 0) + { + printf ("No stencil bits available.\n" + "Cannot mask polygon holes or subcomposite layers\n"); + /* TODO: Flag this to the HID so it can revert to the dicer? */ + } + else if (stencil_bits == 1) + { + printf ("Only one stencil bitplane avilable\n" + "Cannot use stencil buffer to sub-composite layers.\n"); + /* Do we need to disable that somewhere? */ + } +} + +int +hidgl_stencil_bits (void) +{ + return stencil_bits; +} + +static void +hidgl_clean_unassigned_stencil (void) +{ + glPushAttrib (GL_STENCIL_BUFFER_BIT); + glStencilMask (~assigned_bits); + glClearStencil (0); + glClear (GL_STENCIL_BUFFER_BIT); + glPopAttrib (); +} + +int +hidgl_assign_clear_stencil_bit (void) +{ + int stencil_bitmask = (1 << stencil_bits) - 1; + int test; + int first_dirty = 0; + + if (assigned_bits == stencil_bitmask) + { + printf ("No more stencil bits available, total of %i already assigned\n", + stencil_bits); + return 0; + } + + /* Look for a bitplane we don't have to clear */ + for (test = 1; test & stencil_bitmask; test <<= 1) + { + if (!(test & dirty_bits)) + { + assigned_bits |= test; + dirty_bits |= test; + return test; + } + else if (!first_dirty && !(test & assigned_bits)) + { + first_dirty = test; + } + } + + /* Didn't find any non dirty planes. Clear those dirty ones which aren't in use */ + hidgl_clean_unassigned_stencil (); + assigned_bits |= first_dirty; + dirty_bits = assigned_bits; + + return first_dirty; +} + +void +hidgl_return_stencil_bit (int bit) +{ + assigned_bits &= ~bit; +} + +void +hidgl_reset_stencil_usage (void) +{ + assigned_bits = 0; + dirty_bits = 0; +} Index: trunk/.pc/outdated_config.diff/config.guess =================================================================== --- trunk/.pc/outdated_config.diff/config.guess (nonexistent) +++ trunk/.pc/outdated_config.diff/config.guess (revision 4) @@ -0,0 +1,1463 @@ +#! /bin/sh +# Attempt to guess a canonical system name. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. + +timestamp='2005-07-08' + +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA +# 02110-1301, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + + +# Originally written by Per Bothner . +# Please send patches to . Submit a context +# diff and a properly formatted ChangeLog entry. +# +# This script attempts to guess a canonical system name similar to +# config.sub. If it succeeds, it prints the system name on stdout, and +# exits with 0. Otherwise, it exits with 1. +# +# The plan is that this can be called by configure scripts if you +# don't specify an explicit build system type. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] + +Output the configuration name of the system \`$me' is run on. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.guess ($timestamp) + +Originally written by Per Bothner. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 +Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --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 -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; +dummy=$tmp/dummy ; +tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; +case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int x;" > $dummy.c ; + for c in cc gcc c89 c99 ; do + if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then + CC_FOR_BUILD="$c"; break ; + fi ; + done ; + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found ; + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; +esac ; set_cc_for_build= ;' + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi@noc.rutgers.edu 1994-08-24) +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +# Note: order is significant - the case branches are not exclusive. + +case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + *:NetBSD:*:*) + # NetBSD (nbsd) targets should (where applicable) match one or + # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # + # Note: NetBSD doesn't particularly care about the vendor + # portion of the name. We always set it to "unknown". + sysctl="sysctl -n hw.machine_arch" + UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ + /usr/sbin/$sysctl 2>/dev/null || echo unknown)` + case "${UNAME_MACHINE_ARCH}" in + armeb) machine=armeb-unknown ;; + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; + *) machine=${UNAME_MACHINE_ARCH}-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently, or will in the future. + case "${UNAME_MACHINE_ARCH}" in + arm*|i386|m68k|ns32k|sh3*|sparc|vax) + eval $set_cc_for_build + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep __ELF__ >/dev/null + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac + # The OS release + # Debian GNU/NetBSD machines have a different userland, and + # thus, need a distinct triplet. However, they do not need + # kernel version information, so it can be replaced with a + # suitable tag, in the style of linux-gnu. + case "${UNAME_VERSION}" in + Debian*) + release='-gnu' + ;; + *) + release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + ;; + esac + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "${machine}-${os}${release}" + exit ;; + *: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 ;; + macppc:MirBSD:*:*) + echo powerppc-unknown-mirbsd${UNAME_RELEASE} + exit ;; + *:MirBSD:*:*) + echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} + exit ;; + alpha:OSF1:*:*) + case $UNAME_RELEASE in + *4.0) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + ;; + *5.*) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + ;; + esac + # According to Compaq, /usr/sbin/psrinfo has been available on + # OSF/1 and Tru64 systems produced since 1995. I hope that + # covers most systems running today. This code pipes the CPU + # types through head -n 1, so we only detect the type of CPU 0. + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` + case "$ALPHA_CPU_TYPE" in + "EV4 (21064)") + UNAME_MACHINE="alpha" ;; + "EV4.5 (21064)") + UNAME_MACHINE="alpha" ;; + "LCA4 (21066/21068)") + UNAME_MACHINE="alpha" ;; + "EV5 (21164)") + UNAME_MACHINE="alphaev5" ;; + "EV5.6 (21164A)") + UNAME_MACHINE="alphaev56" ;; + "EV5.6 (21164PC)") + UNAME_MACHINE="alphapca56" ;; + "EV5.7 (21164PC)") + UNAME_MACHINE="alphapca57" ;; + "EV6 (21264)") + UNAME_MACHINE="alphaev6" ;; + "EV6.7 (21264A)") + UNAME_MACHINE="alphaev67" ;; + "EV6.8CB (21264C)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8AL (21264B)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8CX (21264D)") + UNAME_MACHINE="alphaev68" ;; + "EV6.9A (21264/EV69A)") + UNAME_MACHINE="alphaev69" ;; + "EV7 (21364)") + UNAME_MACHINE="alphaev7" ;; + "EV7.9 (21364A)") + UNAME_MACHINE="alphaev79" ;; + esac + # A Pn.n version is a patched version. + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + exit ;; + Alpha\ *:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # Should we change UNAME_MACHINE based on the output of uname instead + # of the specific Alpha model? + echo alpha-pc-interix + exit ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 + exit ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-unknown-sysv4 + exit ;; + *:[Aa]miga[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-amigaos + exit ;; + *:[Mm]orph[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-morphos + exit ;; + *:OS/390:*:*) + echo i370-ibm-openedition + exit ;; + *:z/VM:*:*) + echo s390-ibm-zvmoe + exit ;; + *:OS400:*:*) + echo powerpc-ibm-os400 + exit ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} + exit ;; + arm:riscos:*:*|arm:RISCOS:*:*) + echo arm-unknown-riscos + exit ;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit ;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit ;; + DRS?6000:unix:4.0:6*) + echo sparc-icl-nx6 + exit ;; + DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) + case `/usr/bin/uname -p` in + sparc) echo sparc-icl-nx7; exit ;; + esac ;; + 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:SunOS:5.*:*) + echo i386-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:*:[45]) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` + if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc + fi + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${IBM_ARCH}-ibm-aix${IBM_REV} + exit ;; + *: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 __LP64__ >/dev/null + 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:*:*) + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit ;; + i*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin + exit ;; + i*:MINGW*:*) + echo ${UNAME_MACHINE}-pc-mingw32 + exit ;; + i*:windows32*:*) + # uname -m includes "-pc" on this system. + echo ${UNAME_MACHINE}-mingw32 + exit ;; + i*:PW*:*) + echo ${UNAME_MACHINE}-pc-pw32 + exit ;; + x86:Interix*:[34]*) + echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' + exit ;; + [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) + echo i${UNAME_MACHINE}-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*:*:*) + echo x86_64-unknown-cygwin + exit ;; + p*:CYGWIN*:*) + echo powerpcle-unknown-cygwin + exit ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + *:GNU:*:*) + # the GNU system + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + exit ;; + *:GNU/*:*:*) + # other systems with GNU libc and userland + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu + exit ;; + i*86:Minix:*:*) + echo ${UNAME_MACHINE}-pc-minix + exit ;; + arm*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + cris:Linux:*:*) + echo cris-axis-linux-gnu + exit ;; + crisv32:Linux:*:*) + echo crisv32-axis-linux-gnu + exit ;; + frv:Linux:*:*) + echo frv-unknown-linux-gnu + exit ;; + ia64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + m32r*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + m68*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + mips:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef mips + #undef mipsel + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=mipsel + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=mips + #else + CPU= + #endif + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + ;; + mips64:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef mips64 + #undef mips64el + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=mips64el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=mips64 + #else + CPU= + #endif + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-gnu + exit ;; + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-gnu + 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 ld.so.1 >/dev/null + if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi + echo ${UNAME_MACHINE}-unknown-linux-gnu${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-gnu ;; + PA8*) echo hppa2.0-unknown-linux-gnu ;; + *) echo hppa-unknown-linux-gnu ;; + esac + exit ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-gnu + exit ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo ${UNAME_MACHINE}-ibm-linux + exit ;; + sh64*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + sh*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + x86_64:Linux:*:*) + echo x86_64-unknown-linux-gnu + exit ;; + i*86:Linux:*:*) + # The BFD linker knows what the default object file format is, so + # first see if it will tell us. cd to the root directory to prevent + # problems with other programs or directories called `ld' in the path. + # Set LC_ALL=C to ensure ld outputs messages in English. + ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ + | sed -ne '/supported targets:/!d + s/[ ][ ]*/ /g + s/.*supported targets: *// + s/ .*// + p'` + case "$ld_supported_targets" in + elf32-i386) + TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" + ;; + a.out-i386-linux) + echo "${UNAME_MACHINE}-pc-linux-gnuaout" + exit ;; + coff-i386) + echo "${UNAME_MACHINE}-pc-linux-gnucoff" + exit ;; + "") + # Either a pre-BFD a.out linker (linux-gnuoldld) or + # one that does not give us useful --help. + echo "${UNAME_MACHINE}-pc-linux-gnuoldld" + exit ;; + esac + # Determine whether the default compiler is a.out or elf + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + #ifdef __ELF__ + # ifdef __GLIBC__ + # if __GLIBC__ >= 2 + LIBC=gnu + # else + LIBC=gnulibc1 + # endif + # else + LIBC=gnulibc1 + # endif + #else + #ifdef __INTEL_COMPILER + LIBC=gnu + #else + LIBC=gnuaout + #endif + #endif + #ifdef __dietlibc__ + LIBC=dietlibc + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` + test x"${LIBC}" != x && { + echo "${UNAME_MACHINE}-pc-linux-${LIBC}" + exit + } + test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; 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.0*:*) + 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 i386. + echo i386-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; } ;; + 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.0*:*) + 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 ;; + 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 ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody${UNAME_RELEASE} + exit ;; + *:Rhapsody:*:*) + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} + exit ;; + *:Darwin:*:*) + UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown + case $UNAME_PROCESSOR in + *86) UNAME_PROCESSOR=i686 ;; + unknown) UNAME_PROCESSOR=powerpc ;; + esac + echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} + exit ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + UNAME_PROCESSOR=`uname -p` + if test "$UNAME_PROCESSOR" = "x86"; then + UNAME_PROCESSOR=i386 + UNAME_MACHINE=pc + fi + echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} + exit ;; + *:QNX:*:4*) + echo i386-pc-qnx + exit ;; + NSE-?:NONSTOP_KERNEL:*:*) + echo nse-tandem-nsk${UNAME_RELEASE} + exit ;; + NSR-?:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk${UNAME_RELEASE} + exit ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux + exit ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv + exit ;; + DS/*:UNIX_System_V:*:*) + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} + exit ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 + # operating systems. + if test "$cputype" = "386"; then + UNAME_MACHINE=i386 + else + UNAME_MACHINE="$cputype" + fi + echo ${UNAME_MACHINE}-unknown-plan9 + exit ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 + exit ;; + *:TENEX:*:*) + echo pdp10-unknown-tenex + exit ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 + exit ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 + exit ;; + *:TOPS-20:*:*) + echo pdp10-unknown-tops20 + exit ;; + *:ITS:*:*) + echo pdp10-unknown-its + exit ;; + SEI:*:*:SEIUX) + echo mips-sei-seiux${UNAME_RELEASE} + exit ;; + *:DragonFly:*:*) + echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit ;; + *:*VMS:*:*) + UNAME_MACHINE=`(uname -p) 2>/dev/null` + case "${UNAME_MACHINE}" in + A*) echo alpha-dec-vms ; exit ;; + I*) echo ia64-dec-vms ; exit ;; + V*) echo vax-dec-vms ; exit ;; + esac ;; + *:XENIX:*:SysV) + echo i386-pc-xenix + exit ;; + i*86:skyos:*:*) + echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' + exit ;; +esac + +#echo '(No uname command or uname output not recognized.)' 1>&2 +#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 + +eval $set_cc_for_build +cat >$dummy.c < +# include +#endif +main () +{ +#if defined (sony) +#if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); +#else +#include + printf ("m68k-sony-newsos%s\n", +#ifdef NEWSOS4 + "4" +#else + "" +#endif + ); exit (0); +#endif +#endif + +#if defined (__arm) && defined (__acorn) && defined (__unix) + printf ("arm-acorn-riscix\n"); exit (0); +#endif + +#if defined (hp300) && !defined (hpux) + printf ("m68k-hp-bsd\n"); exit (0); +#endif + +#if defined (NeXT) +#if !defined (__ARCHITECTURE__) +#define __ARCHITECTURE__ "m68k" +#endif + int version; + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; + if (version < 4) + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + else + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); + exit (0); +#endif + +#if defined (MULTIMAX) || defined (n16) +#if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); +#else +#if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); +#else + printf ("ns32k-encore-bsd\n"); exit (0); +#endif +#endif +#endif + +#if defined (__386BSD__) + printf ("i386-pc-bsd\n"); exit (0); +#endif + +#if defined (sequent) +#if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); +#endif +#if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); +#endif +#endif + +#if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); + +#endif + +#if defined (vax) +# if !defined (ultrix) +# include +# if defined (BSD) +# if BSD == 43 + printf ("vax-dec-bsd4.3\n"); exit (0); +# else +# if BSD == 199006 + printf ("vax-dec-bsd4.3reno\n"); exit (0); +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# endif +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# else + printf ("vax-dec-ultrix\n"); exit (0); +# endif +#endif + +#if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); +#endif + + exit (1); +} +EOF + +$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + +# Apollos put the system type in the environment. + +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } + +# Convex versions that predate uname can use getsysinfo(1) + +if [ -x /usr/convex/getsysinfo ] +then + case `getsysinfo -f cpu_type` in + c1*) + echo c1-convex-bsd + exit ;; + c2*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + c34*) + echo c34-convex-bsd + exit ;; + c38*) + echo c38-convex-bsd + exit ;; + c4*) + echo c4-convex-bsd + exit ;; + esac +fi + +cat >&2 < in order to provide the needed +information to handle your system. + +config.guess timestamp = $timestamp + +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` + +hostinfo = `(hostinfo) 2>/dev/null` +/bin/universe = `(/bin/universe) 2>/dev/null` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` +/bin/arch = `(/bin/arch) 2>/dev/null` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` + +UNAME_MACHINE = ${UNAME_MACHINE} +UNAME_RELEASE = ${UNAME_RELEASE} +UNAME_SYSTEM = ${UNAME_SYSTEM} +UNAME_VERSION = ${UNAME_VERSION} +EOF + +exit 1 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: Property changes on: trunk/.pc/outdated_config.diff/config.guess ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Index: trunk/.pc/outdated_config.diff/config.sub =================================================================== --- trunk/.pc/outdated_config.diff/config.sub (nonexistent) +++ trunk/.pc/outdated_config.diff/config.sub (revision 4) @@ -0,0 +1,1579 @@ +#! /bin/sh +# Configuration validation subroutine script. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. + +timestamp='2005-07-08' + +# This file is (in principle) common to ALL GNU software. +# The presence of a machine in this file suggests that SOME GNU software +# can handle that machine. It does not imply ALL GNU software can. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA +# 02110-1301, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + + +# Please send patches to . Submit a context +# diff and a properly formatted ChangeLog entry. +# +# Configuration subroutine to validate and canonicalize a configuration type. +# Supply the specified configuration type as an argument. +# If it is invalid, we print an error message on stderr and exit with code 1. +# Otherwise, we print the canonical config type on stdout and succeed. + +# This file is supposed to be the same for all GNU packages +# and recognize all the CPU types, system types and aliases +# that are meaningful with *any* GNU software. +# Each package is responsible for reporting which valid configurations +# it does not support. The user should be able to distinguish +# a failure to support a valid configuration from a meaningless +# configuration. + +# The goal of this file is to map all the various variations of a given +# machine specification into a single specification in the form: +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# It is wrong to echo any other type of specification. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] CPU-MFR-OPSYS + $0 [OPTION] ALIAS + +Canonicalize a configuration name. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.sub ($timestamp) + +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 +Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" + exit 1 ;; + + *local*) + # First pass through any local machine types. + echo $1 + exit ;; + + * ) + break ;; + esac +done + +case $# in + 0) echo "$me: missing argument$help" >&2 + exit 1;; + 1) ;; + *) echo "$me: too many arguments$help" >&2 + exit 1;; +esac + +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). +# Here we must recognize all the valid KERNEL-OS combinations. +maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` +case $maybe_os in + nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \ + kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; + *) + basic_machine=`echo $1 | sed 's/-[^-]*$//'` + if [ $basic_machine != $1 ] + then os=`echo $1 | sed 's/.*-/-/'` + else os=; fi + ;; +esac + +### Let's recognize common machines as not being operating systems so +### that things like config.sub decstation-3100 work. We also +### recognize some manufacturers as not being operating systems, so we +### can provide default operating systems below. +case $os in + -sun*os*) + # Prevent following clause from handling this invalid input. + ;; + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ + -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ + -apple | -axis | -knuth | -cray) + os= + basic_machine=$1 + ;; + -sim | -cisco | -oki | -wec | -winbond) + os= + basic_machine=$1 + ;; + -scout) + ;; + -wrs) + os=-vxworks + basic_machine=$1 + ;; + -chorusos*) + os=-chorusos + basic_machine=$1 + ;; + -chorusrdb) + os=-chorusrdb + basic_machine=$1 + ;; + -hiux*) + os=-hiuxwe2 + ;; + -sco5) + os=-sco3.2v5 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco4) + os=-sco3.2v4 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2v[4-9]*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco*) + os=-sco3.2v2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -udk*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -isc) + os=-isc2.2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -clix*) + basic_machine=clipper-intergraph + ;; + -isc*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -lynx*) + os=-lynxos + ;; + -ptx*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` + ;; + -windowsnt*) + os=`echo $os | sed -e 's/windowsnt/winnt/'` + ;; + -psos*) + os=-psos + ;; + -mint | -mint[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; +esac + +# Decode aliases for certain CPU-COMPANY combinations. +case $basic_machine in + # Recognize the basic CPU types without company name. + # Some are omitted here because they have special meanings below. + 1750a | 580 \ + | a29k \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ + | am33_2.0 \ + | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ + | bfin \ + | c4x | clipper \ + | d10v | d30v | dlx | dsp16xx \ + | fr30 | frv \ + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | i370 | i860 | i960 | ia64 \ + | ip2k | iq2000 \ + | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ + | mips64vr | mips64vrel \ + | mips64orion | mips64orionel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mips64vr5900 | mips64vr5900el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipstx39 | mipstx39el \ + | mn10200 | mn10300 \ + | ms1 \ + | msp430 \ + | ns16k | ns32k \ + | or32 \ + | pdp10 | pdp11 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ + | pyramid \ + | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ + | sh64 | sh64le \ + | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \ + | sparcv8 | sparcv9 | sparcv9b \ + | strongarm \ + | tahoe | thumb | tic4x | tic80 | tron \ + | v850 | v850e \ + | we32k \ + | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \ + | z8k) + basic_machine=$basic_machine-unknown + ;; + m32c) + basic_machine=$basic_machine-unknown + ;; + m6811 | m68hc11 | m6812 | m68hc12) + # Motorola 68HC11/12. + basic_machine=$basic_machine-unknown + os=-none + ;; + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) + ;; + + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and + # (2) the word "unknown" tends to confuse beginning users. + i*86 | x86_64) + basic_machine=$basic_machine-pc + ;; + # Object if more than one company name word. + *-*-*) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; + # Recognize the basic CPU types with company name. + 580-* \ + | a29k-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ + | avr-* \ + | bfin-* | bs2000-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ + | clipper-* | craynv-* | cydra-* \ + | d10v-* | d30v-* | dlx-* \ + | elxsi-* \ + | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ + | h8300-* | h8500-* \ + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | i*86-* | i860-* | i960-* | ia64-* \ + | ip2k-* | iq2000-* \ + | m32r-* | m32rle-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ + | m88110-* | m88k-* | maxq-* | mcore-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ + | mips16-* \ + | mips64-* | mips64el-* \ + | mips64vr-* | mips64vrel-* \ + | mips64orion-* | mips64orionel-* \ + | mips64vr4100-* | mips64vr4100el-* \ + | mips64vr4300-* | mips64vr4300el-* \ + | mips64vr5000-* | mips64vr5000el-* \ + | mips64vr5900-* | mips64vr5900el-* \ + | mipsisa32-* | mipsisa32el-* \ + | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa64-* | mipsisa64el-* \ + | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64sb1-* | mipsisa64sb1el-* \ + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipstx39-* | mipstx39el-* \ + | mmix-* \ + | ms1-* \ + | msp430-* \ + | none-* | np1-* | ns16k-* | ns32k-* \ + | orion-* \ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ + | pyramid-* \ + | romp-* | rs6000-* \ + | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \ + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ + | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \ + | sparclite-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ + | tahoe-* | thumb-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tron-* \ + | v850-* | v850e-* | vax-* \ + | we32k-* \ + | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \ + | xstormy16-* | xtensa-* \ + | ymp-* \ + | z8k-*) + ;; + m32c-*) + ;; + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 386bsd) + basic_machine=i386-unknown + os=-bsd + ;; + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + basic_machine=m68000-att + ;; + 3b*) + basic_machine=we32k-att + ;; + a29khif) + basic_machine=a29k-amd + os=-udi + ;; + abacus) + basic_machine=abacus-unknown + ;; + adobe68k) + basic_machine=m68010-adobe + os=-scout + ;; + alliant | fx80) + basic_machine=fx80-alliant + ;; + altos | altos3068) + basic_machine=m68k-altos + ;; + am29k) + basic_machine=a29k-none + os=-bsd + ;; + amd64) + basic_machine=x86_64-pc + ;; + amd64-*) + basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + amdahl) + basic_machine=580-amdahl + os=-sysv + ;; + amiga | amiga-*) + basic_machine=m68k-unknown + ;; + amigaos | amigados) + basic_machine=m68k-unknown + os=-amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + os=-sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=-sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + os=-bsd + ;; + aux) + basic_machine=m68k-apple + os=-aux + ;; + balance) + basic_machine=ns32k-sequent + os=-dynix + ;; + c90) + basic_machine=c90-cray + os=-unicos + ;; + convex-c1) + basic_machine=c1-convex + os=-bsd + ;; + convex-c2) + basic_machine=c2-convex + os=-bsd + ;; + convex-c32) + basic_machine=c32-convex + os=-bsd + ;; + convex-c34) + basic_machine=c34-convex + os=-bsd + ;; + convex-c38) + basic_machine=c38-convex + os=-bsd + ;; + cray | j90) + basic_machine=j90-cray + os=-unicos + ;; + craynv) + basic_machine=craynv-cray + os=-unicosmp + ;; + cr16c) + basic_machine=cr16c-unknown + os=-elf + ;; + crds | unos) + basic_machine=m68k-crds + ;; + crisv32 | crisv32-* | etraxfs*) + basic_machine=crisv32-axis + ;; + cris | cris-* | etrax*) + basic_machine=cris-axis + ;; + crx) + basic_machine=crx-unknown + os=-elf + ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) + basic_machine=mips-dec + ;; + decsystem10* | dec10*) + basic_machine=pdp10-dec + os=-tops10 + ;; + decsystem20* | dec20*) + basic_machine=pdp10-dec + os=-tops20 + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + basic_machine=m68k-motorola + ;; + delta88) + basic_machine=m88k-motorola + os=-sysv3 + ;; + djgpp) + basic_machine=i586-pc + os=-msdosdjgpp + ;; + dpx20 | dpx20-*) + basic_machine=rs6000-bull + os=-bosx + ;; + dpx2* | dpx2*-bull) + basic_machine=m68k-bull + os=-sysv3 + ;; + ebmon29k) + basic_machine=a29k-amd + os=-ebmon + ;; + elxsi) + basic_machine=elxsi-elxsi + os=-bsd + ;; + encore | umax | mmax) + basic_machine=ns32k-encore + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + os=-ose + ;; + fx2800) + basic_machine=i860-alliant + ;; + genix) + basic_machine=ns32k-ns + ;; + gmicro) + basic_machine=tron-gmicro + os=-sysv + ;; + go32) + basic_machine=i386-pc + os=-go32 + ;; + h3050r* | hiux*) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=-hms + ;; + h8300xray) + basic_machine=h8300-hitachi + os=-xray + ;; + h8500hms) + basic_machine=h8500-hitachi + os=-hms + ;; + harris) + basic_machine=m88k-harris + os=-sysv3 + ;; + hp300-*) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=-bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=-hpux + ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + basic_machine=m68000-hp + ;; + hp9k3[2-9][0-9]) + basic_machine=m68k-hp + ;; + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + basic_machine=hppa1.1-hp + ;; + hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][13679] | hp8[0-9][13679]) + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hppa-next) + os=-nextstep3 + ;; + hppaosf) + basic_machine=hppa1.1-hp + os=-osf + ;; + hppro) + basic_machine=hppa1.1-hp + os=-proelf + ;; + i370-ibm* | ibm*) + basic_machine=i370-ibm + ;; +# I'm not sure what "Sysv32" means. Should this be sysv3.2? + i*86v32) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv32 + ;; + i*86v4*) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv4 + ;; + i*86v) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv + ;; + i*86sol2) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-solaris2 + ;; + i386mach) + basic_machine=i386-mach + os=-mach + ;; + i386-vsta | vsta) + basic_machine=i386-unknown + os=-vsta + ;; + iris | iris4d) + basic_machine=mips-sgi + case $os in + -irix*) + ;; + *) + os=-irix4 + ;; + esac + ;; + isi68 | isi) + basic_machine=m68k-isi + os=-sysv + ;; + m88k-omron*) + basic_machine=m88k-omron + ;; + magnum | m3230) + basic_machine=mips-mips + os=-sysv + ;; + merlin) + basic_machine=ns32k-utek + os=-sysv + ;; + mingw32) + basic_machine=i386-pc + os=-mingw32 + ;; + miniframe) + basic_machine=m68000-convergent + ;; + *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; + mips3*-*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` + ;; + mips3*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown + ;; + monitor) + basic_machine=m68k-rom68k + os=-coff + ;; + morphos) + basic_machine=powerpc-unknown + os=-morphos + ;; + msdos) + basic_machine=i386-pc + os=-msdos + ;; + mvs) + basic_machine=i370-ibm + os=-mvs + ;; + ncr3000) + basic_machine=i486-ncr + os=-sysv4 + ;; + netbsd386) + basic_machine=i386-unknown + os=-netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + os=-linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=-newsos + ;; + news1000) + basic_machine=m68030-sony + os=-newsos + ;; + news-3600 | risc-news) + basic_machine=mips-sony + os=-newsos + ;; + necv70) + basic_machine=v70-nec + os=-sysv + ;; + next | m*-next ) + basic_machine=m68k-next + case $os in + -nextstep* ) + ;; + -ns2*) + os=-nextstep2 + ;; + *) + os=-nextstep3 + ;; + esac + ;; + nh3000) + basic_machine=m68k-harris + os=-cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=-cxux + ;; + nindy960) + basic_machine=i960-intel + os=-nindy + ;; + mon960) + basic_machine=i960-intel + os=-mon960 + ;; + nonstopux) + basic_machine=mips-compaq + os=-nonstopux + ;; + np1) + basic_machine=np1-gould + ;; + nsr-tandem) + basic_machine=nsr-tandem + ;; + op50n-* | op60c-*) + basic_machine=hppa1.1-oki + os=-proelf + ;; + 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 + ;; + pbd) + basic_machine=sparc-tti + ;; + pbb) + basic_machine=m68k-tti + ;; + pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; + pentium | p5 | k5 | k6 | nexgen | viac3) + basic_machine=i586-pc + ;; + pentiumpro | p6 | 6x86 | athlon | athlon_*) + basic_machine=i686-pc + ;; + pentiumii | pentium2 | pentiumiii | pentium3) + basic_machine=i686-pc + ;; + pentium4) + basic_machine=i786-pc + ;; + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) + basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumpro-* | p6-* | 6x86-* | athlon-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentium4-*) + basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pn) + basic_machine=pn-gould + ;; + power) basic_machine=power-ibm + ;; + ppc) basic_machine=powerpc-unknown + ;; + ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppcle | powerpclittle | ppc-le | powerpc-little) + basic_machine=powerpcle-unknown + ;; + ppcle-* | powerpclittle-*) + basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64) basic_machine=powerpc64-unknown + ;; + ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64le | powerpc64little | ppc64-le | powerpc64-little) + basic_machine=powerpc64le-unknown + ;; + ppc64le-* | powerpc64little-*) + basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ps2) + basic_machine=i386-ibm + ;; + pw32) + basic_machine=i586-unknown + os=-pw32 + ;; + rom68k) + basic_machine=m68k-rom68k + os=-coff + ;; + rm[46]00) + basic_machine=mips-siemens + ;; + rtpc | rtpc-*) + basic_machine=romp-ibm + ;; + s390 | s390-*) + basic_machine=s390-ibm + ;; + s390x | s390x-*) + basic_machine=s390x-ibm + ;; + sa29200) + basic_machine=a29k-amd + os=-udi + ;; + sb1) + basic_machine=mipsisa64sb1-unknown + ;; + sb1el) + basic_machine=mipsisa64sb1el-unknown + ;; + sei) + basic_machine=mips-sei + os=-seiux + ;; + sequent) + basic_machine=i386-sequent + ;; + sh) + basic_machine=sh-hitachi + os=-hms + ;; + sh64) + basic_machine=sh64-unknown + ;; + sparclite-wrs | simso-wrs) + basic_machine=sparclite-wrs + os=-vxworks + ;; + sps7) + basic_machine=m68k-bull + os=-sysv2 + ;; + spur) + basic_machine=spur-unknown + ;; + st2000) + basic_machine=m68k-tandem + ;; + stratus) + basic_machine=i860-stratus + os=-sysv4 + ;; + sun2) + basic_machine=m68000-sun + ;; + sun2os3) + basic_machine=m68000-sun + os=-sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=-sunos4 + ;; + sun3os3) + basic_machine=m68k-sun + os=-sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=-sunos4 + ;; + sun4os3) + basic_machine=sparc-sun + os=-sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=-sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=-solaris2 + ;; + sun3 | sun3-*) + basic_machine=m68k-sun + ;; + sun4) + basic_machine=sparc-sun + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + ;; + sv1) + basic_machine=sv1-cray + os=-unicos + ;; + symmetry) + basic_machine=i386-sequent + os=-dynix + ;; + t3e) + basic_machine=alphaev5-cray + os=-unicos + ;; + t90) + basic_machine=t90-cray + os=-unicos + ;; + tic54x | c54x*) + basic_machine=tic54x-unknown + os=-coff + ;; + tic55x | c55x*) + basic_machine=tic55x-unknown + os=-coff + ;; + tic6x | c6x*) + basic_machine=tic6x-unknown + os=-coff + ;; + tx39) + basic_machine=mipstx39-unknown + ;; + tx39el) + basic_machine=mipstx39el-unknown + ;; + toad1) + basic_machine=pdp10-xkl + os=-tops20 + ;; + tower | tower-32) + basic_machine=m68k-ncr + ;; + tpf) + basic_machine=s390x-ibm + os=-tpf + ;; + udi29k) + basic_machine=a29k-amd + os=-udi + ;; + ultra3) + basic_machine=a29k-nyu + os=-sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + os=-none + ;; + vaxv) + basic_machine=vax-dec + os=-sysv + ;; + vms) + basic_machine=vax-dec + os=-vms + ;; + vpp*|vx|vx-*) + basic_machine=f301-fujitsu + ;; + vxworks960) + basic_machine=i960-wrs + os=-vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=-vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=-vxworks + ;; + w65*) + basic_machine=w65-wdc + os=-none + ;; + w89k-*) + basic_machine=hppa1.1-winbond + os=-proelf + ;; + xbox) + basic_machine=i686-pc + os=-mingw32 + ;; + xps | xps100) + basic_machine=xps100-honeywell + ;; + ymp) + basic_machine=ymp-cray + os=-unicos + ;; + z8k-*-coff) + basic_machine=z8k-unknown + os=-sim + ;; + none) + basic_machine=none-none + os=-none + ;; + +# Here we handle the default manufacturer of certain CPU types. It is in +# some cases the only manufacturer, in others, it is the most popular. + w89k) + basic_machine=hppa1.1-winbond + ;; + op50n) + basic_machine=hppa1.1-oki + ;; + op60c) + basic_machine=hppa1.1-oki + ;; + romp) + basic_machine=romp-ibm + ;; + mmix) + basic_machine=mmix-knuth + ;; + rs6000) + basic_machine=rs6000-ibm + ;; + vax) + basic_machine=vax-dec + ;; + pdp10) + # there are many clones, so DEC is not a safe bet + basic_machine=pdp10-unknown + ;; + pdp11) + basic_machine=pdp11-dec + ;; + we32k) + basic_machine=we32k-att + ;; + sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) + basic_machine=sh-unknown + ;; + sparc | sparcv8 | sparcv9 | sparcv9b) + basic_machine=sparc-sun + ;; + cydra) + basic_machine=cydra-cydrome + ;; + orion) + basic_machine=orion-highlevel + ;; + orion105) + basic_machine=clipper-highlevel + ;; + mac | mpw | mac-mpw) + basic_machine=m68k-apple + ;; + pmac | pmac-mpw) + basic_machine=powerpc-apple + ;; + *-unknown) + # Make sure to match an already-canonicalized machine name. + ;; + *) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; +esac + +# Here we canonicalize certain aliases for manufacturers. +case $basic_machine in + *-digital*) + basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` + ;; + *-commodore*) + basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` + ;; + *) + ;; +esac + +# Decode manufacturer-specific aliases for certain operating systems. + +if [ x"$os" != x"" ] +then +case $os in + # First match some system type aliases + # that might get confused with valid system types. + # -solaris* is a basic system type, with this one exception. + -solaris1 | -solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; + -solaris) + os=-solaris2 + ;; + -svr4*) + os=-sysv4 + ;; + -unixware*) + os=-sysv4.2uw + ;; + -gnu/linux*) + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` + ;; + # First accept the basic system types. + # The portable systems comes first. + # Each alternative MUST END IN A *, to match a version number. + # -sysv* is not here because it comes later, after sysvr4. + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ + | -aos* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \ + | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ + | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -chorusos* | -chorusrdb* \ + | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ + | -skyos* | -haiku*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -qnx*) + case $basic_machine in + x86-* | i*86-*) + ;; + *) + os=-nto$os + ;; + esac + ;; + -nto-qnx*) + ;; + -nto*) + os=`echo $os | sed -e 's|nto|nto-qnx|'` + ;; + -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ + | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) + ;; + -mac*) + os=`echo $os | sed -e 's|mac|macos|'` + ;; + -linux-dietlibc) + os=-linux-dietlibc + ;; + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; + -sunos5*) + os=`echo $os | sed -e 's|sunos5|solaris2|'` + ;; + -sunos6*) + os=`echo $os | sed -e 's|sunos6|solaris3|'` + ;; + -opened*) + os=-openedition + ;; + -os400*) + os=-os400 + ;; + -wince*) + os=-wince + ;; + -osfrose*) + os=-osfrose + ;; + -osf*) + os=-osf + ;; + -utek*) + os=-bsd + ;; + -dynix*) + os=-bsd + ;; + -acis*) + os=-aos + ;; + -atheos*) + os=-atheos + ;; + -syllable*) + os=-syllable + ;; + -386bsd) + os=-bsd + ;; + -ctix* | -uts*) + os=-sysv + ;; + -nova*) + os=-rtmk-nova + ;; + -ns2 ) + os=-nextstep2 + ;; + -nsk*) + os=-nsk + ;; + # Preserve the version number of sinix5. + -sinix5.*) + os=`echo $os | sed -e 's|sinix|sysv|'` + ;; + -sinix*) + os=-sysv4 + ;; + -tpf*) + os=-tpf + ;; + -triton*) + os=-sysv3 + ;; + -oss*) + os=-sysv3 + ;; + -svr4) + os=-sysv4 + ;; + -svr3) + os=-sysv3 + ;; + -sysvr4) + os=-sysv4 + ;; + # This must come after -sysvr4. + -sysv*) + ;; + -ose*) + os=-ose + ;; + -es1800*) + os=-ose + ;; + -xenix) + os=-xenix + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + os=-mint + ;; + -aros*) + os=-aros + ;; + -kaos*) + os=-kaos + ;; + -zvmoe) + os=-zvmoe + ;; + -none) + ;; + *) + # Get rid of the `-' at the beginning of $os. + os=`echo $os | sed 's/[^-]*-//'` + echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 + exit 1 + ;; +esac +else + +# Here we handle the default operating systems that come with various machines. +# The value should be what the vendor currently ships out the door with their +# machine or put another way, the most popular os provided with the machine. + +# Note that if you're going to try to match "-MANUFACTURER" here (say, +# "-sun"), then you have to tell the case statement up towards the top +# that MANUFACTURER isn't an operating system. Otherwise, code above +# will signal an error saying that MANUFACTURER isn't an operating +# system, and we'll never get to this point. + +case $basic_machine in + *-acorn) + os=-riscix1.2 + ;; + arm*-rebel) + os=-linux + ;; + arm*-semi) + os=-aout + ;; + c4x-* | tic4x-*) + os=-coff + ;; + # This must come before the *-dec entry. + pdp10-*) + os=-tops20 + ;; + pdp11-*) + os=-none + ;; + *-dec | vax-*) + os=-ultrix4.2 + ;; + m68*-apollo) + os=-domain + ;; + i386-sun) + os=-sunos4.0.2 + ;; + m68000-sun) + os=-sunos3 + # This also exists in the configure program, but was not the + # default. + # os=-sunos4 + ;; + m68*-cisco) + os=-aout + ;; + mips*-cisco) + os=-elf + ;; + mips*-*) + os=-elf + ;; + or32-*) + os=-coff + ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=-sysv3 + ;; + sparc-* | *-sun) + os=-sunos4.1.1 + ;; + *-be) + os=-beos + ;; + *-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 + ;; + -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: Property changes on: trunk/.pc/outdated_config.diff/config.sub ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Index: trunk/.pc/pcbtest_paths.diff/src/pcbtest.sh.in =================================================================== --- trunk/.pc/pcbtest_paths.diff/src/pcbtest.sh.in (nonexistent) +++ trunk/.pc/pcbtest_paths.diff/src/pcbtest.sh.in (revision 4) @@ -0,0 +1,95 @@ +#! /bin/sh +# +# COPYRIGHT +# +# PCB, interactive printed circuit board design +# Copyright (C) 1994,1995,1996 Thomas Nau +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# +# Contact addresses for paper mail and Email: +# Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany +# Thomas.Nau@rz.uni-ulm.de +# +# RCS: $Id$ +# +# +# +# starts a test installation of pcb + +# execute pcb + +# If the first argument is "-gdb" then run PCB inside the gdb +# debugger. +# +# Use --g-fatal-warnings with the gtk HID to cause gtk-WARNING's to +# abort. + +TEST_PATHS="--lib-path @TOP_BUILDDIR@/lib --lib-newlib @TOPSRCDIR@/newlib:@TOP_BUILDDIR@/lib/pcblib-newlib --element-path @TOP_BUILDDIR@/lib --font-path @TOPSRCDIR@/src" +TEST_CMDS="--lib-command-dir @TOP_BUILDDIR@/lib" + +# note: To do command line exporting, pcb requires the "-x " command to appear first. For example +# +# pcb -x bom [other args] pcbfile +# +# as opposed to +# +# pcb [other args] -x bom pcbfile +# + +use_gdb=no +if [ "X$1" = "X-gdb" ]; then + use_gdb=yes + shift +fi + +args="" +export_args="" + +while test $# -ne 0 ; do + case $1 in + -x) + export_args="$1 $2" + shift 2 + ;; + *) + args="$args $1" + shift + ;; + esac +done + +# build up the complete argument list +arg_list="$export_args $TEST_PATHS $TEST_CMDS $args" + +if test $use_gdb = yes ; then + tmpd=/tmp/pcbtest.$$ + tmpf=${tmpd}/pcbtest.gdb + mkdir -p -m 0700 ${tmpd} + rc=$? + if test $rc -ne 0 ; then + echo "$0: Could not create ${tmpd} with mode = 0700" + echo " mkdir returned $rc" + exit 1 + fi + cat > $tmpf << EOF +set args $arg_list +EOF + exec gdb -x $tmpf ./pcb + rm -fr $tmpd +else + exec @TOP_BUILDDIR@/src/pcb $arg_list +fi + Property changes on: trunk/.pc/pcbtest_paths.diff/src/pcbtest.sh.in ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Index: trunk/ABOUT-NLS =================================================================== --- trunk/ABOUT-NLS (nonexistent) +++ trunk/ABOUT-NLS (revision 4) @@ -0,0 +1,768 @@ +Notes on the Free Translation Project +************************************* + +Free software is going international! The Free Translation Project is +a way to get maintainers of free software, translators, and users all +together, so that will gradually become able to speak many languages. +A few packages already provide translations for their messages. + + If you found this `ABOUT-NLS' file inside a distribution, you may +assume that the distributed package does use GNU `gettext' internally, +itself available at your nearest GNU archive site. But you do _not_ +need to install GNU `gettext' prior to configuring, installing or using +this package with messages translated. + + Installers will find here some useful hints. These notes also +explain how users should proceed for getting the programs to use the +available translations. They tell how people wanting to contribute and +work at translations should contact the appropriate team. + + When reporting bugs in the `intl/' directory or bugs which may be +related to internationalization, you should tell about the version of +`gettext' which is used. The information can be found in the +`intl/VERSION' file, in internationalized packages. + +Quick configuration advice +========================== + +If you want to exploit the full power of internationalization, you +should configure it using + + ./configure --with-included-gettext + +to force usage of internationalizing routines provided within this +package, despite the existence of internationalizing capabilities in the +operating system where this package is being installed. So far, only +the `gettext' implementation in the GNU C library version 2 provides as +many features (such as locale alias, message inheritance, automatic +charset conversion or plural form handling) as the implementation here. +It is also not possible to offer this additional functionality on top +of a `catgets' implementation. Future versions of GNU `gettext' will +very likely convey even more functionality. So it might be a good idea +to change to GNU `gettext' as soon as possible. + + So you need _not_ provide this option if you are using GNU libc 2 or +you have installed a recent copy of the GNU gettext package with the +included `libintl'. + +INSTALL Matters +=============== + +Some packages are "localizable" when properly installed; the programs +they contain can be made to speak your own native language. Most such +packages use GNU `gettext'. Other packages have their own ways to +internationalization, predating GNU `gettext'. + + By default, this package will be installed to allow translation of +messages. It will automatically detect whether the system already +provides the GNU `gettext' functions. If not, the GNU `gettext' own +library will be used. This library is wholly contained within this +package, usually in the `intl/' subdirectory, so prior installation of +the GNU `gettext' package is _not_ required. Installers may use +special options at configuration time for changing the default +behaviour. The commands: + + ./configure --with-included-gettext + ./configure --disable-nls + +will respectively bypass any pre-existing `gettext' to use the +internationalizing routines provided within this package, or else, +_totally_ disable translation of messages. + + When you already have GNU `gettext' installed on your system and run +configure without an option for your new package, `configure' will +probably detect the previously built and installed `libintl.a' file and +will decide to use this. This might be not what is desirable. You +should use the more recent version of the GNU `gettext' library. I.e. +if the file `intl/VERSION' shows that the library which comes with this +package is more recent, you should use + + ./configure --with-included-gettext + +to prevent auto-detection. + + The configuration process will not test for the `catgets' function +and therefore it will not be used. The reason is that even an +emulation of `gettext' on top of `catgets' could not provide all the +extensions of the GNU `gettext' library. + + Internationalized packages have usually many `po/LL.po' files, where +LL gives an ISO 639 two-letter code identifying the language. Unless +translations have been forbidden at `configure' time by using the +`--disable-nls' switch, all available translations are installed +together with the package. However, the environment variable `LINGUAS' +may be set, prior to configuration, to limit the installed set. +`LINGUAS' should then contain a space separated list of two-letter +codes, stating which languages are allowed. + +Using This Package +================== + +As a user, if your language has been installed for this package, you +only have to set the `LANG' environment variable to the appropriate +`LL_CC' combination. Here `LL' is an ISO 639 two-letter language code, +and `CC' is an ISO 3166 two-letter country code. For example, let's +suppose that you speak German and live in Germany. At the shell +prompt, merely execute `setenv LANG de_DE' (in `csh'), +`export LANG; LANG=de_DE' (in `sh') or `export LANG=de_DE' (in `bash'). +This can be done from your `.login' or `.profile' file, once and for +all. + + You might think that the country code specification is redundant. +But in fact, some languages have dialects in different countries. For +example, `de_AT' is used for Austria, and `pt_BR' for Brazil. The +country code serves to distinguish the dialects. + + The locale naming convention of `LL_CC', with `LL' denoting the +language and `CC' denoting the country, is the one use on systems based +on GNU libc. On other systems, some variations of this scheme are +used, such as `LL' or `LL_CC.ENCODING'. You can get the list of +locales supported by your system for your country by running the command +`locale -a | grep '^LL''. + + Not all programs have translations for all languages. By default, an +English message is shown in place of a nonexistent translation. If you +understand other languages, you can set up a priority list of languages. +This is done through a different environment variable, called +`LANGUAGE'. GNU `gettext' gives preference to `LANGUAGE' over `LANG' +for the purpose of message handling, but you still need to have `LANG' +set to the primary language; this is required by other parts of the +system libraries. For example, some Swedish users who would rather +read translations in German than English for when Swedish is not +available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'. + + Special advice for Norwegian users: The language code for Norwegian +bokma*l changed from `no' to `nb' recently (in 2003). During the +transition period, while some message catalogs for this language are +installed under `nb' and some older ones under `no', it's recommended +for Norwegian users to set `LANGUAGE' to `nb:no' so that both newer and +older translations are used. + + In the `LANGUAGE' environment variable, but not in the `LANG' +environment variable, `LL_CC' combinations can be abbreviated as `LL' +to denote the language's main dialect. For example, `de' is equivalent +to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT' +(Portuguese as spoken in Portugal) in this context. + +Translating Teams +================= + +For the Free Translation Project to be a success, we need interested +people who like their own language and write it well, and who are also +able to synergize with other translators speaking the same language. +Each translation team has its own mailing list. The up-to-date list of +teams can be found at the Free Translation Project's homepage, +`http://www.iro.umontreal.ca/contrib/po/HTML/', in the "National teams" +area. + + If you'd like to volunteer to _work_ at translating messages, you +should become a member of the translating team for your own language. +The subscribing address is _not_ the same as the list itself, it has +`-request' appended. For example, speakers of Swedish can send a +message to `sv-request@li.org', having this message body: + + subscribe + + Keep in mind that team members are expected to participate +_actively_ in translations, or at solving translational difficulties, +rather than merely lurking around. If your team does not exist yet and +you want to start one, or if you are unsure about what to do or how to +get started, please write to `translation@iro.umontreal.ca' to reach the +coordinator for all translator teams. + + The English team is special. It works at improving and uniformizing +the terminology in use. Proven linguistic skill are praised more than +programming skill, here. + +Available Packages +================== + +Languages are not equally supported in all packages. The following +matrix shows the current state of internationalization, as of January +2004. The matrix shows, in regard of each package, for which languages +PO files have been submitted to translation coordination, with a +translation percentage of at least 50%. + + Ready PO files af am ar az be bg bs ca cs da de el en en_GB eo es + +----------------------------------------------------+ + a2ps | [] [] [] [] | + aegis | () | + ant-phone | () | + anubis | | + ap-utils | | + aspell | [] | + bash | [] [] [] [] | + batchelor | | + bfd | [] [] | + binutils | [] [] | + bison | [] [] [] | + bluez-pin | [] [] [] | + clisp | | + clisp | [] [] [] | + console-tools | [] [] | + coreutils | [] [] [] [] | + cpio | [] [] [] | + darkstat | [] () [] | + diffutils | [] [] [] [] [] [] [] | + e2fsprogs | [] [] [] | + enscript | [] [] [] [] | + error | [] [] [] [] [] | + fetchmail | [] () [] [] [] [] | + fileutils | [] [] [] | + findutils | [] [] [] [] [] [] [] | + flex | [] [] [] [] | + fslint | | + gas | [] | + gawk | [] [] [] [] | + gbiff | [] | + gcal | [] | + gcc | [] [] | + gettext | [] [] [] [] [] | + gettext-examples | [] [] [] [] | + gettext-runtime | [] [] [] [] [] | + gettext-tools | [] [] [] | + gimp-print | [] [] [] [] [] | + gliv | | + glunarclock | [] [] | + gnubiff | [] | + gnucash | [] () [] [] | + gnucash-glossary | [] () [] | + gnupg | [] () [] [] [] [] | + gpe-aerial | [] | + gpe-beam | [] [] | + gpe-calendar | [] [] | + gpe-clock | [] [] | + gpe-conf | [] [] | + gpe-contacts | [] [] | + gpe-edit | [] | + gpe-go | [] | + gpe-login | [] [] | + gpe-ownerinfo | [] [] | + gpe-sketchbook | [] [] | + gpe-su | [] [] | + gpe-taskmanager | [] [] | + gpe-timesheet | [] | + gpe-today | [] [] | + gpe-todo | [] [] | + gphoto2 | [] [] [] [] | + gprof | [] [] [] | + gpsdrive | () () () | + gramadoir | [] | + grep | [] [] [] [] [] [] | + gretl | [] | + gtick | [] () | + hello | [] [] [] [] [] [] | + id-utils | [] [] | + indent | [] [] [] [] | + iso_3166 | [] [] [] [] [] [] [] [] [] [] | + iso_3166_1 | [] [] [] [] [] [] | + iso_3166_2 | | + iso_3166_3 | [] | + iso_4217 | [] [] [] [] | + iso_639 | | + jpilot | [] [] [] | + jtag | | + jwhois | [] | + kbd | [] [] [] [] [] | + latrine | () | + ld | [] [] | + libc | [] [] [] [] [] [] | + libgpewidget | [] [] | + libiconv | [] [] [] [] [] | + lifelines | [] () | + lilypond | [] | + lingoteach | | + lingoteach_lessons | () () | + lynx | [] [] [] [] | + m4 | [] [] [] [] | + mailutils | [] [] | + make | [] [] [] | + man-db | [] () [] [] () | + minicom | [] [] [] | + mysecretdiary | [] [] [] | + nano | [] () [] [] [] | + nano_1_0 | [] () [] [] [] | + opcodes | [] | + parted | [] [] [] [] [] | + ptx | [] [] [] [] [] | + python | | + radius | [] | + recode | [] [] [] [] [] [] [] | + rpm | [] [] | + screem | | + scrollkeeper | [] [] [] [] [] [] | + sed | [] [] [] [] [] [] | + sh-utils | [] [] [] | + shared-mime-info | | + sharutils | [] [] [] [] [] [] | + silky | () | + skencil | [] () [] | + sketch | [] () [] | + soundtracker | [] [] [] | + sp | [] | + tar | [] [] [] [] | + texinfo | [] [] [] | + textutils | [] [] [] [] | + tin | () () | + tp-robot | | + tuxpaint | [] [] [] [] [] [] [] | + unicode-han-tra... | | + unicode-transla... | | + util-linux | [] [] [] [] [] | + vorbis-tools | [] [] [] [] | + wastesedge | () | + wdiff | [] [] [] [] | + wget | [] [] [] [] [] [] | + xchat | [] [] [] [] | + xfree86_xkb_xml | [] [] | + xpad | [] | + +----------------------------------------------------+ + af am ar az be bg bs ca cs da de el en en_GB eo es + 4 0 0 1 9 4 1 40 41 60 78 17 1 5 13 68 + + et eu fa fi fr ga gl he hr hu id is it ja ko lg + +-------------------------------------------------+ + a2ps | [] [] [] () () | + aegis | | + ant-phone | [] | + anubis | [] | + ap-utils | [] | + aspell | [] [] | + bash | [] [] | + batchelor | [] [] | + bfd | [] | + binutils | [] [] | + bison | [] [] [] [] | + bluez-pin | [] [] [] [] [] | + clisp | | + clisp | [] | + console-tools | | + coreutils | [] [] [] [] [] [] | + cpio | [] [] [] [] | + darkstat | () [] [] [] | + diffutils | [] [] [] [] [] [] [] | + e2fsprogs | | + enscript | [] [] | + error | [] [] [] [] | + fetchmail | [] | + fileutils | [] [] [] [] [] [] | + findutils | [] [] [] [] [] [] [] [] [] [] [] | + flex | [] [] [] | + fslint | [] | + gas | [] | + gawk | [] [] [] | + gbiff | [] | + gcal | [] | + gcc | [] | + gettext | [] [] [] | + gettext-examples | [] [] | + gettext-runtime | [] [] [] [] [] | + gettext-tools | [] [] [] | + gimp-print | [] [] | + gliv | () | + glunarclock | [] [] [] [] | + gnubiff | [] | + gnucash | () [] | + gnucash-glossary | [] | + gnupg | [] [] [] [] [] [] [] | + gpe-aerial | [] | + gpe-beam | [] | + gpe-calendar | [] [] [] | + gpe-clock | [] | + gpe-conf | [] | + gpe-contacts | [] [] | + gpe-edit | [] [] | + gpe-go | [] | + gpe-login | [] [] | + gpe-ownerinfo | [] [] [] | + gpe-sketchbook | [] | + gpe-su | [] | + gpe-taskmanager | [] | + gpe-timesheet | [] [] [] | + gpe-today | [] [] | + gpe-todo | [] [] | + gphoto2 | [] [] [] | + gprof | [] [] | + gpsdrive | () () () | + gramadoir | [] [] | + grep | [] [] [] [] [] [] [] [] [] [] [] | + gretl | [] [] | + gtick | [] [] [] | + hello | [] [] [] [] [] [] [] [] [] [] [] [] [] | + id-utils | [] [] [] [] | + indent | [] [] [] [] [] [] [] [] [] | + iso_3166 | [] [] [] [] [] [] [] | + iso_3166_1 | [] [] [] [] [] | + iso_3166_2 | | + iso_3166_3 | | + iso_4217 | [] [] [] [] [] [] | + iso_639 | | + jpilot | [] () | + jtag | [] | + jwhois | [] [] [] [] | + kbd | [] | + latrine | [] | + ld | [] | + libc | [] [] [] [] [] [] | + libgpewidget | [] [] [] [] | + libiconv | [] [] [] [] [] [] [] [] [] | + lifelines | () | + lilypond | [] | + lingoteach | [] [] | + lingoteach_lessons | | + lynx | [] [] [] [] | + m4 | [] [] [] [] | + mailutils | | + make | [] [] [] [] [] [] | + man-db | () () | + minicom | [] [] [] [] | + mysecretdiary | [] [] | + nano | [] [] [] [] | + nano_1_0 | [] [] [] [] | + opcodes | [] | + parted | [] [] [] | + ptx | [] [] [] [] [] [] [] | + python | | + radius | [] | + recode | [] [] [] [] [] [] | + rpm | [] [] | + screem | | + scrollkeeper | [] | + sed | [] [] [] [] [] [] [] [] [] | + sh-utils | [] [] [] [] [] [] [] | + shared-mime-info | [] [] [] | + sharutils | [] [] [] [] [] | + silky | () [] () () | + skencil | [] | + sketch | [] | + soundtracker | [] [] | + sp | [] () | + tar | [] [] [] [] [] [] [] [] [] | + texinfo | [] [] [] [] | + textutils | [] [] [] [] [] [] | + tin | [] () | + tp-robot | [] | + tuxpaint | [] [] [] [] [] [] [] [] [] | + unicode-han-tra... | | + unicode-transla... | [] [] | + util-linux | [] [] [] [] () [] | + vorbis-tools | [] | + wastesedge | () | + wdiff | [] [] [] [] [] [] | + wget | [] [] [] [] [] [] [] | + xchat | [] [] [] | + xfree86_xkb_xml | [] [] | + xpad | [] [] | + +-------------------------------------------------+ + et eu fa fi fr ga gl he hr hu id is it ja ko lg + 22 2 1 26 106 28 24 8 10 41 33 1 26 33 12 0 + + lt lv mk mn ms mt nb nl nn no nso pl pt pt_BR ro ru + +-----------------------------------------------------+ + a2ps | [] [] () () [] [] [] | + aegis | () () () | + ant-phone | [] [] | + anubis | [] [] [] [] [] [] | + ap-utils | [] () [] | + aspell | [] | + bash | [] [] [] | + batchelor | [] | + bfd | [] | + binutils | [] | + bison | [] [] [] [] [] | + bluez-pin | [] [] [] | + clisp | | + clisp | [] | + console-tools | [] | + coreutils | [] [] | + cpio | [] [] [] [] [] | + darkstat | [] [] [] [] | + diffutils | [] [] [] [] [] [] | + e2fsprogs | [] | + enscript | [] [] [] [] | + error | [] [] [] | + fetchmail | [] [] () [] | + fileutils | [] [] [] | + findutils | [] [] [] [] [] | + flex | [] [] [] [] | + fslint | [] [] | + gas | | + gawk | [] [] [] | + gbiff | [] [] | + gcal | | + gcc | | + gettext | [] [] [] | + gettext-examples | [] [] [] | + gettext-runtime | [] [] [] [] | + gettext-tools | [] [] | + gimp-print | [] | + gliv | [] [] [] | + glunarclock | [] [] [] [] | + gnubiff | [] | + gnucash | [] [] () [] | + gnucash-glossary | [] [] | + gnupg | [] | + gpe-aerial | [] [] [] [] | + gpe-beam | [] [] [] [] | + gpe-calendar | [] [] [] [] | + gpe-clock | [] [] [] [] | + gpe-conf | [] [] [] [] | + gpe-contacts | [] [] [] [] | + gpe-edit | [] [] [] [] | + gpe-go | [] [] [] | + gpe-login | [] [] [] [] | + gpe-ownerinfo | [] [] [] [] | + gpe-sketchbook | [] [] [] [] | + gpe-su | [] [] [] [] | + gpe-taskmanager | [] [] [] [] | + gpe-timesheet | [] [] [] [] | + gpe-today | [] [] [] [] | + gpe-todo | [] [] [] [] | + gphoto2 | [] | + gprof | [] [] | + gpsdrive | () () [] | + gramadoir | () [] | + grep | [] [] [] [] [] | + gretl | | + gtick | [] [] [] | + hello | [] [] [] [] [] [] [] [] [] [] | + id-utils | [] [] [] [] | + indent | [] [] [] [] | + iso_3166 | [] [] [] | + iso_3166_1 | [] [] | + iso_3166_2 | | + iso_3166_3 | [] | + iso_4217 | [] [] [] [] [] [] [] [] | + iso_639 | [] | + jpilot | () () | + jtag | | + jwhois | [] [] [] [] () | + kbd | [] [] [] | + latrine | [] | + ld | | + libc | [] [] [] [] | + libgpewidget | [] [] [] | + libiconv | [] [] [] [] [] | + lifelines | | + lilypond | | + lingoteach | | + lingoteach_lessons | | + lynx | [] [] [] | + m4 | [] [] [] [] [] | + mailutils | [] [] [] | + make | [] [] [] [] | + man-db | [] | + minicom | [] [] [] [] | + mysecretdiary | [] [] [] | + nano | [] [] [] [] [] | + nano_1_0 | [] [] [] [] [] [] | + opcodes | [] [] | + parted | [] [] [] [] | + ptx | [] [] [] [] [] [] [] [] | + python | | + radius | [] [] | + recode | [] [] [] [] | + rpm | [] [] [] | + screem | | + scrollkeeper | [] [] [] [] [] | + sed | [] [] [] | + sh-utils | [] [] | + shared-mime-info | [] [] | + sharutils | [] [] | + silky | () | + skencil | [] [] | + sketch | [] [] | + soundtracker | | + sp | | + tar | [] [] [] [] [] [] | + texinfo | [] [] [] [] | + textutils | [] [] | + tin | | + tp-robot | [] | + tuxpaint | [] [] [] [] [] [] [] [] | + unicode-han-tra... | | + unicode-transla... | | + util-linux | [] [] [] | + vorbis-tools | [] [] [] | + wastesedge | | + wdiff | [] [] [] [] [] | + wget | [] [] [] | + xchat | [] [] [] | + xfree86_xkb_xml | [] [] | + xpad | [] [] | + +-----------------------------------------------------+ + lt lv mk mn ms mt nb nl nn no nso pl pt pt_BR ro ru + 1 2 0 3 12 0 10 69 6 7 1 40 26 36 76 63 + + sk sl sr sv ta th tr uk ven vi wa xh zh_CN zh_TW zu + +-----------------------------------------------------+ + a2ps | [] [] [] [] | 16 + aegis | | 0 + ant-phone | | 3 + anubis | [] [] | 9 + ap-utils | () | 3 + aspell | | 4 + bash | | 9 + batchelor | | 3 + bfd | [] [] | 6 + binutils | [] [] [] | 8 + bison | [] [] | 14 + bluez-pin | [] [] [] | 14 + clisp | | 0 + clisp | | 5 + console-tools | | 3 + coreutils | [] [] [] [] | 16 + cpio | [] [] | 14 + darkstat | [] [] [] () () | 12 + diffutils | [] [] [] | 23 + e2fsprogs | [] [] | 6 + enscript | [] [] | 12 + error | [] [] [] | 15 + fetchmail | [] [] | 11 + fileutils | [] [] [] [] [] | 17 + findutils | [] [] [] [] [] [] | 29 + flex | [] [] | 13 + fslint | | 3 + gas | [] | 3 + gawk | [] [] | 12 + gbiff | | 4 + gcal | [] [] | 4 + gcc | [] | 4 + gettext | [] [] [] [] [] | 16 + gettext-examples | [] [] [] [] [] | 14 + gettext-runtime | [] [] [] [] [] [] [] [] | 22 + gettext-tools | [] [] [] [] [] [] | 14 + gimp-print | [] [] | 10 + gliv | | 3 + glunarclock | [] [] [] | 13 + gnubiff | | 3 + gnucash | [] [] | 9 + gnucash-glossary | [] [] [] | 8 + gnupg | [] [] [] [] | 17 + gpe-aerial | [] | 7 + gpe-beam | [] | 8 + gpe-calendar | [] [] [] [] | 13 + gpe-clock | [] [] [] | 10 + gpe-conf | [] [] | 9 + gpe-contacts | [] [] [] | 11 + gpe-edit | [] [] [] [] [] | 12 + gpe-go | | 5 + gpe-login | [] [] [] [] [] | 13 + gpe-ownerinfo | [] [] [] [] | 13 + gpe-sketchbook | [] [] | 9 + gpe-su | [] [] [] | 10 + gpe-taskmanager | [] [] [] | 10 + gpe-timesheet | [] [] [] [] | 12 + gpe-today | [] [] [] [] [] | 13 + gpe-todo | [] [] [] [] | 12 + gphoto2 | [] [] [] | 11 + gprof | [] [] | 9 + gpsdrive | [] [] | 3 + gramadoir | [] | 5 + grep | [] [] [] [] | 26 + gretl | | 3 + gtick | | 7 + hello | [] [] [] [] [] | 34 + id-utils | [] [] | 12 + indent | [] [] [] [] | 21 + iso_3166 | [] [] [] [] [] [] [] | 27 + iso_3166_1 | [] [] [] | 16 + iso_3166_2 | | 0 + iso_3166_3 | | 2 + iso_4217 | [] [] [] [] [] [] | 24 + iso_639 | | 1 + jpilot | [] [] [] [] [] | 9 + jtag | [] | 2 + jwhois | () [] [] | 11 + kbd | [] [] | 11 + latrine | | 2 + ld | [] [] | 5 + libc | [] [] [] [] | 20 + libgpewidget | [] [] [] [] | 13 + libiconv | [] [] [] [] [] [] [] [] | 27 + lifelines | [] | 2 + lilypond | [] | 3 + lingoteach | | 2 + lingoteach_lessons | () | 0 + lynx | [] [] [] | 14 + m4 | [] [] | 15 + mailutils | | 5 + make | [] [] [] | 16 + man-db | [] | 5 + minicom | | 11 + mysecretdiary | [] [] | 10 + nano | [] [] [] [] | 17 + nano_1_0 | [] [] [] | 17 + opcodes | [] [] | 6 + parted | [] [] [] | 15 + ptx | [] [] | 22 + python | | 0 + radius | | 4 + recode | [] [] [] | 20 + rpm | [] [] | 9 + screem | [] [] | 2 + scrollkeeper | [] [] [] | 15 + sed | [] [] [] [] [] [] | 24 + sh-utils | [] [] | 14 + shared-mime-info | [] [] | 7 + sharutils | [] [] [] [] | 17 + silky | () | 3 + skencil | [] | 6 + sketch | [] | 6 + soundtracker | [] [] | 7 + sp | [] | 3 + tar | [] [] [] [] [] | 24 + texinfo | [] [] [] | 14 + textutils | [] [] [] [] | 16 + tin | | 1 + tp-robot | | 2 + tuxpaint | [] [] [] [] [] | 29 + unicode-han-tra... | | 0 + unicode-transla... | | 2 + util-linux | [] [] | 15 + vorbis-tools | | 8 + wastesedge | | 0 + wdiff | [] [] [] | 18 + wget | [] [] [] [] [] [] [] [] | 24 + xchat | [] [] [] [] [] | 15 + xfree86_xkb_xml | [] [] [] [] [] | 11 + xpad | | 5 + +-----------------------------------------------------+ + 63 teams sk sl sr sv ta th tr uk ven vi wa xh zh_CN zh_TW zu + 131 domains 47 19 28 83 0 0 59 13 1 1 11 0 22 22 0 1373 + + Some counters in the preceding matrix are higher than the number of +visible blocks let us expect. This is because a few extra PO files are +used for implementing regional variants of languages, or language +dialects. + + For a PO file in the matrix above to be effective, the package to +which it applies should also have been internationalized and +distributed as such by its maintainer. There might be an observable +lag between the mere existence a PO file and its wide availability in a +distribution. + + If January 2004 seems to be old, you may fetch a more recent copy of +this `ABOUT-NLS' file on most GNU archive sites. The most up-to-date +matrix with full percentage details can be found at +`http://www.iro.umontreal.ca/contrib/po/HTML/matrix.html'. + +Using `gettext' in new packages +=============================== + +If you are writing a freely available program and want to +internationalize it you are welcome to use GNU `gettext' in your +package. Of course you have to respect the GNU Library General Public +License which covers the use of the GNU `gettext' library. This means +in particular that even non-free programs can use `libintl' as a shared +library, whereas only free software can use `libintl' as a static +library or use modified versions of `libintl'. + + Once the sources are changed appropriately and the setup can handle +the use of `gettext' the only thing missing are the translations. The +Free Translation Project is also available for packages which are not +developed inside the GNU project. Therefore the information given above +applies also for every other Free Software Project. Contact +`translation@iro.umontreal.ca' to make the `.pot' files available to +the translation teams. + Index: trunk/AUTHORS =================================================================== --- trunk/AUTHORS (nonexistent) +++ trunk/AUTHORS (revision 4) @@ -0,0 +1,6 @@ +PCB was originally written by Thomas Nau +Development was later taken over by harry eaton +The port to GTK was done by Bill Wilson +Dan McMahill converted the build system from imake to autoconf/automake. +DJ Delorie wrote the trace optimizer, added symbolic flag support and +many other improvements. Index: trunk/COPYING =================================================================== --- trunk/COPYING (nonexistent) +++ trunk/COPYING (revision 4) @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. Index: trunk/ChangeLog =================================================================== --- trunk/ChangeLog (nonexistent) +++ trunk/ChangeLog (revision 4) @@ -0,0 +1,17654 @@ +2011-09-18 DJ Delorie * dj AT delorie dot com * + + * po/POTFILES.in: Remove src/hid/common/hidgl_package_vrml_y.c from + POTFILES.in Reverts 61bd0cb1e134bbea96abd6fd2d5fb94d09c0b3c8 as this file + doesn't exist in this repository, causing a distcheck failure. + +2011-09-18 DJ Delorie * dj AT delorie dot com * + + * : Update golden files for nanometers hid_png3 was off by a pixel on a line end. I retested my UV and TT + films to verify that the nanometers conversion didn't affect line + *widths* and updated the golden file to accept this one-pixel + difference. + +2011-09-17 DJ Delorie * dj AT delorie dot com * + + * src/action.c: [windows] use unix-style path separators when + calling gnetlist + +2011-09-17 Felix Ruoff * Felix AT posaunenmission dot de * + + * : commit 70db91fc3dfb8b378962794fc8f86f71b52f7af8 Author: + Kai-Martin Knaak * kmk AT lilalaser dot de * Date: Fri Sep 16 + 01:07:32 2011 +0200 + +2011-09-16 Kai-Martin Knaak * kmk AT lilalaser dot de * + + * doc/pcb.texi: remove panner control from documentation There is no panner control in the GUI (anymore?) since at least five + years. this pathc removes its description from the texi manual. + +2011-09-17 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * src/file.c, src/main.c: Don't adjust the Library command settings + if they are NULL, or an empty string. (The empty string part is a fixup for commit + 31df66e87a810aac852139da9119b15c47fa8c71 - this will teach me for bikeshedding) The NULL part should fix bug lp-852598 Closes-bug: lp-852598 + +2011-09-17 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * src/file.c, src/main.c: Bikeshed commit + 11700ba8c3c951a788c8190073eb09822060dfdd I don't like magic strings, and IMO, using a blank + LibraryContentsCommand string to imply "don't use this feature" is + better than "*NONE*". + +2011-09-17 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * src/hid/gtk/gui-top-window.c: hid/gtk: Set the LC_NUMERIC locale + to "C" rather than "POSIX" This value is supported on Win32 platforms, whereas "POSIX" doesn't + appear to have any effect. This was one possible way to fix the "zoom doesn't work" bug on + Win32 for locales which use "," as the decimal separator. DJ fixed the Zoom action to be locale independent in commit + fd5399c67b988f2f7c9d1a0b4ab7c13bc2e95158, which worked around the + problem for this particular action, but I feel it would be best that + we made our locale handling consistent between Linux and Win32 as + well. Affects-bug: lp-843577 + +2011-09-08 Dima Kogan * dima AT secretsauce dot net * + + * src/djopt.c: fixed an instance of the "only-optimize-autorouted" + flag being ignored Signed-off-by: Dima Kogan * dima AT secretsauce dot net * + +2011-09-16 DJ Delorie * dj AT delorie dot com * + + * src/file.c, src/main.c: Skip the M4 library on Windows On Windows, set the LibraryContentsCommand to the magic string + "*NONE*" and check for that string while loading the libraries. + This avoids the windows pcb.exe from trying to run bash or m4 + scripts, which are normally not available, yet allows the user a way + to re-enable them if they want. + +2011-09-16 DJ Delorie * dj AT delorie dot com * + + * src/hid/gtk/gtkhid-main.c, src/hid/lesstif/main.c: De-localize + zoom parsing The values used for Zoom() were being parsed with strtod(), which + switches between '.' and ',' depending on locale. Switch to + g_ascii_strtod() which always uses '.' and thus always matches our + actions. Note: I didn't change the command line parsing, because I didn't + think we should impose '.'-centric syntax on other locales. + +2011-09-16 DJ Delorie * dj AT delorie dot com * + + * lib/generic.list: Add DIL footprint names and R025. Existing tutorials say to use "DIL 16 300" for DIPs (we use "N 16 + 300") and often call for the R025 footprint, so add them as aliases + so the m4-to-newlib converter includes them. + +2011-09-16 DJ Delorie * dj AT delorie dot com * + + * lib/m4lib_to_newlib.sh: Fix m4-to-newlib converter filenames The m4 library uses macros and parameters to describe footprints, + which allows for a *very* flexible footprint naming scheme. While + it is impossible for pcb to know all valid footprint values, it does + have a list of "standard" ones, and knows how to obtain those. + However, the m4 to newlib converter wasn't using the same footprint + naming convention as everyone else, so produced *.fp files that + weren't always useful. For example, there were a large number of + 300.fp files that all collided. With this fix, the footprint name matches the value in [...] in the + library window, which is what we tell people to use for the + "footprint=" attribute anyway. + +2011-09-16 DJ Delorie * dj AT delorie dot com * + + * src/hid/lesstif/lesstif.h: Wrap all XmStrings in gettext() + +2011-09-15 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * po/POTFILES.in: Add another missing source file to POTFILES.in + +2011-09-15 DJ Delorie * dj AT delorie dot com * + + * src/main.c: Add locale functions Add textdomain() and setlocale() to connect to our message catalogs. + +2011-09-15 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * po/POTFILES.in: Add some missing files to POTFILES.in (And sorted the file contents). Reported-by: Bert Timmerman * bert dot timmerman AT xs4all dot nl * + Affects-bug: lp-846368 + +2011-09-09 Bert Timmerman * bert dot timmerman AT xs4all dot nl * + + * po/nl.po: Updated the Dutch translation. + +2011-09-15 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * src/report.c: report.c: Don't leave actions in the undo stack or + change the user's flags Some actions in ReportNetLength*() would have been lumped in with + whatever actions were next added to the undo stack. These functions + also left the user's board with a different "FOUND" flags on various + items. In the case of the "Report(AllNetLenths)" action, a very long undo + stack would be created, which is not very helpful to the user. These changes hide the internal flag changes made during the net + length calculation from the undo system. We are able to get back to the inital board state because we save + the operations caused by our initial RestConnections() on the undo + stack. After we have done our work (modifying various flags in the + process), we reset the flags again (this time bypassing the Undo + system), so the board is consistent with the ResetConnections() call + we DID save undo data for. We then Undo() these changes before we + leave the function. + +2011-09-15 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * src/report.c: report.c: Return 1 for all failure conditions in + ReportNetLengthByName() + +2011-09-14 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * src/undo.c: undo.c: Add error message where + RestoreUndoSerialNumber() will break things If operations are addded to the undo stack between a call to + IncrementUndoSerialNumber() and a subsequent call for + RestoreUndoSerialNumber(), those added operations will be placed in + the undo stack with an inconsistent serial number. The {Save,Restore}UndoSerialNumber() API is pretty fragile in this + regard, and we should avoid using it where possible. An better alternative might be to implement a + "LockUndoSerialNumber()" call which temporarily disables + IncrementUndoSerialNumber(), and a "UnlockUndoSerialNumber()" call + which re-enables its increment function. Better yet - we could make these functions nestable, so we need not + worry whether some action uses this new feature internally when we + are also using it. + +2011-09-14 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * src/undo.c: undo.c: Handle undo failures in a more sane manner Our current error-case handling can cause serial number + inconsistency when something goes wrong when performing an Undo + operation. There are also various logic flaws in our handling, as it + only catches failures where every sub-undo operation with that + serial number fails. Remove the confusing do-loop which decrements the serial number in + the failure case, and return some sensible error message instead. This patch also removes the code which looked like it was intended + to loop over the undo stack until a serial number was found to + operate on. It is advantageous for code like the DRC to be able to + add increment the undo serial number, then safely perform an Undo - + even if there were no changes logged in the undo system during the + previous serial number. Closes-bug: lp-848509 + +2011-09-14 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * src/undo.c: undo.c: Allow undo of locked objects Our internal actions can make changes to locked objects, then use + the undo mechanism to revert these changes. An example is DRC, which + changes flags on objects and uses the Undo system to restore their + original values. Affects-bug: lp-848509 + +2011-09-14 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * src/find.c: find.c: Remove stray RestoreUndoSerialNumber() calls These will cause havoc with the undo system, as we don't actually + save a serial number to restore to. Until a commit efd212c1deb264e9a7f2be17e9338fbb60e22cc0 we were + saving a serial number at the start of each "ResetConnections + (true);" call, and it would have been that serial number which got + restored. With this and some other fixes to the undo system, these restores + are no longer required. Affects-bug: lp-848509 + +2011-09-14 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * src/hid/gtk/gtkhid-main.c: gtk: Fix ghid_zoom_view_fit() to work + when the board is flipped. Affects-bug: lp-850311 + +2011-09-13 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * src/hid/common/hidgl.c, src/hid/gtk/gtkhid-gl.c: Fixup OpenGL + includes for better compatibility with OSX Not tested ;) + +2011-09-13 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * autogen.sh, configure.ac, m4/ax_check_gl.m4, m4/ax_check_glu.m4, + m4/ax_lang_compiler_ms.m4, m4/ax_pthread.m4: Better autoconf tests + for GL and GLU (from GtkGLExt - GPL v2 or later) These tests should give better cross platform support for our build. + +2011-09-13 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * .gitignore, m4/.gitignore: Remove the m4 directory from the root + .gitignore file and add its own + +2011-09-13 DJ Delorie * dj AT delorie dot com * + + * src/hid/lesstif/styles.c: [lesstif] set units for styles dialog in + more places The styles dialog was segfaulting as the units hadn't been set yet, + if you open the style dialog before doing anything with the grid. + +2011-09-13 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * src/hid/gtk/gtkhid-gl.c: hid/gtk: Remove misplaced (and redundant) + hidgl_flush_triangles() call. If we were to flush the triangle buffer in ghid_show_crosshair(), we + should do it before we set XOR mode on the GL context (assuming the + buffer might be dirty when we are called), and we should do it after + we finish drawing (if we wish to leave the buffer clean when we + return). The location the flush was in before this commit is just plain + wrong. As we currently have flushes of the triangle buffer wrapping the + call to ghid_show_crosshair(), just leave the flushing out of this + function. Does this commit message provide an adequate example of simple + patch, complex commit message phenomenon? + +2011-09-13 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * src/hid/gtk/gtkhid-gdk.c, src/hid/gtk/gtkhid-gl.c, + src/hid/gtk/gtkhid-main.c, src/hid/gtk/gui-config.c, + src/hid/gtk/gui-output-events.c, src/hid/gtk/gui.h: hid/gtk: Remove + auto-pan feature (kill it with fire). This seems to be fairly universally unpopular on geda-user, and its + implementation is a little fragile, often leading the board to pan + off to some corner of the board as the poor user reaches for the + layer selector or a menu without having remembered to click the + feature off. The fact that the pan direction and speed was set the instant you + leave the drawing window also made it particularly unhelpful. A + proper implementation should have grabbed the mouse - or at least + implemented some buffer zone in which the mouse could be used to + give feedback on the pan direction. + +2011-09-11 DJ Delorie * dj AT delorie dot com * + + * src/hid/gtk/gtkhid-main.c: [windows] set GDK_PIXBUF_MODULE_FILE If we're using a local gdk-pixbuf installation, we need to set this + env variable to point to it. + +2011-09-11 Bdale Garbee * bdale AT gag dot com * + + * doc/Makefile.am: Invoke eps2png in $(srcdir), no . + +2011-09-12 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * src/hid/common/hidgl.c: hid/common: Remove #include "draw.h" from + hidgl.c (twice!) + +2011-09-11 Dima Kogan * dima AT secretsauce dot net * + + * src/hid/gtk/ghid-route-style-selector.c, + src/hid/gtk/ghid-route-style-selector.h, src/hid/gtk/gtkhid-main.c: + Re-ordered all references in the style selector dialog to have one + consistent ordering. Everything that refers to the settings in the style selector dialog + now does so in order of Line thickness Hole size Hole thickness (hole + annular ring) + keepaway region size This wasn't 100% consistent previously, which resulted in a bug + (fixed in a previous patch). This patch doesn't touch the + functionality, but improves the style to avoid future bugs. Modified to apply on recent route style selector changes by Bert + Timmerman. Signed-off-by: Andrew Poelstra (local) * apoelstra AT wpsoftware + dot net * Affects-bug: lp-844635 + +2011-09-11 Dima Kogan * dima AT secretsauce dot net * + + * src/hid/gtk/ghid-route-style-selector.c: Swap via-hole and -ring + size connection in route style selector dialog Closes-bug: lp-844635 Signed-off-by: Andrew Poelstra (local) * apoelstra AT wpsoftware + dot net * + +2011-09-10 Andrew Poelstra (local) * apoelstra AT wpsoftware dot net * + + * src/hid/gtk/gtkhid-main.c, src/hid/gtk/gui-top-window.c, + src/hid/gtk/gui.h: Repopulate route style selector on PCBChanged + action When loading a new pcb, Bad Things happen to the route style + selector because pcb's route style data is freed. This patch removes + all styles from the route style selector and re-adds them whenever a + new pcb is loaded. + +2011-09-10 Andrew Poelstra (local) * apoelstra AT wpsoftware dot net * + + * src/hid/gtk/ghid-route-style-selector.c, + src/hid/gtk/ghid-route-style-selector.h: Add + ghid_route_style_selector_empty to GHidRouteStyleSelector + +2011-09-10 Andrew Poelstra (local) * apoelstra AT wpsoftware dot net * + + * src/hid/gtk/ghid-route-style-selector.c: Add finalize function to + GHidRouteStyleSelector + +2011-09-09 Bert Timmerman * bert dot timmerman AT xs4all dot nl * + + * po/POTFILES.in: Remove the src/hid/gtk/gui-dialog-size.c entry + from the translatable files list. This is a completion of commit: + a914d5ba58104d8559395b66798b35761afb991a "Replace old route style + selector with GHidRouteStyleSelector" dated 20110903 11:09 PM + +2011-09-09 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * src/hid/gtk/ghid-layer-selector.c: hid/gtk: Filter out double + clicks on the layer selector widget This makes things behave a little nicer if you click to toggle a + layer's visibility twice in quick succession. Previously, this would + be interpreted as a double-click, causing an extra synthetic click + event which would toggle the visibility an extra time. + +2011-09-07 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * src/hid/gtk/gui-top-window.c: hid/gtk: Update file-changed + notification bar to match gedit a bit more 1. Add a stock "refresh" image to the "Reload" button. 2. Change the message text when the board has modifications. 3. Reload without further prompting if the user presses "Reload", even if the board is modified. (We already warned them due to + 2.) + +2011-09-07 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * src/hid/gtk/gtkhid-main.c, src/hid/gtk/gui-top-window.c, + src/hid/gtk/gui.h: hid/gtk: Reimplement file-change monitor without + GFileMonitor I must have had a brain-fail when I hooked up setting up the + file-changed monitor in the function which sets the window title. + NB: That also gets called after every menu operation! A better place to hook up the monitor would be + ghid_sync_with_new_layout(), however changing this alone revealed + another issue - we would get notified for changes WE make to the + files. We were avoiding those events as the file-monitor was being + reset before it could pop up, at the end of the menu action which + invoked the save). However - due to a race condition bug in GLib / GIO, we would + sometimes see change notify events for changes we made, even when we + hooked up the GFileMonitor AFTER having saved (and synced) our + changes to disk. Rather than attempt to work around this bug, implement the + file-change notification in a much more simple way - look at the + file mtime when we update the layout, and at each time the mouse + pointer enters the main window. FWIW, this is how gedit currently + achieves the same feature. + +2011-09-06 DJ Delorie * dj AT delorie dot com * + + * src/action.c: Warn user if footprints can't be found on import Since the message log doesn't make it obvious, add a pop-up dialog + whenever there are missing footprints during an import. Affects-bug: lp-828388 + +2011-09-06 DJ Delorie * dj AT delorie dot com * + + * src/search.c: Fix math error in IsPointOnLine() The math in C didn't match the math in the comment (and, apparently, + hasn't for quite some time). To test: Draw three lines, from 1000,3000 to 1500,2500, then to + 2000,3000, then back to the start at 1000,3000. Without this patch, + the first and last lines are removed and replaced with a copy of the + second line. + +2011-09-05 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * src/action.c, src/file.c, src/file.h, src/hid/common/actions.c: + Implement a new RevertPCB() call, sharing code with LoadPCB() The RevertPCB() takes no filename parameter, and aside from that, + the only difference to LoadPCB is that when it calls the GUI's + "PCBChanged" action, it passes a new "revert" argument. This should + let the GUIs optionally do less work resetting the view state for a + board being reverted. + +2011-09-06 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * src/action.c, src/command.c, src/hid.h: Add a HID API call, + notify_pcb_filename_change() This is so the core can tell the GUI when the PCB being edited is + saved into a different file. + +2011-09-05 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * src/file.c, src/hid.h: Add a HID API call, notify_save_pcb() + called around saving the PCB The intention of this API is so that GUIs monitoring the active PCB + file on disk for changes, can filter out changes which occur as we + save the file ourselves. + +2011-09-06 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * src/action.c, src/command.c, src/file.c: file.c: Don't set the PCB + filename or changed flags inside SavePCB (Filename) Save this for the caller to do. (action.c already set the filename + for the SaveAs case anyway). + +2011-09-06 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * src/hid/gtk/gtkhid-main.c: Revert "hid/gtk: Avoid the deprecated + gdk_drawable_get_display()" This reverts commit c6d6ca16e58b5c7f2248c21e3248825f54e52374. Turns out the replacement API I used was only introduced in GTK + 2.24, which is still a little new for us here. + +2011-09-05 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * src/hid/gtk/gui-top-window.c, src/hid/gtk/gui-utils.c: hid/gtk: + Remove usage of deprecated gtk_range_set_update_policy() We only set this to the default value anyway, and the API has been + removed with no replacements. + +2011-09-05 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * src/hid/gtk/gui-top-window.c, src/hid/gtk/gui-utils.c: hid/gtk: + Replace gtk_container_border_width with + gtk_container_set_border_width Replaces the old deprecated API. + +2011-09-05 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * src/hid/gtk/gui-utils.c: hid/gtk: Use g_signal_connect(), not + gtk_signal_connect() gtk_signal_connect() is deprecated. + +2011-09-05 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * src/hid/gtk/gui-dialog-print.c: hid/gtk: Re-write the tool-tip + handling code to use newer tooltip API Use the gtk_widget_set_tooltip* API introduced in GTK 2.12. This + avoids the APIs deprecated in GTK 2.12, and also avoids the + requirement to pack GTK_WIDGET_NO_WINDOW widgets inside + gtk_event_box() widgets to make their tooltips work. + +2011-09-05 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * src/hid/gtk/gui-drc-window.c, src/hid/gtk/gui-library-window.c, + src/hid/gtk/gui-log-window.c, src/hid/gtk/gui-netlist-window.c, + src/hid/gtk/gui-pinout-window.c, src/hid/gtk/gui-top-window.c: + hid/gtk: Replace usage of the deprecated gtk_widget_set_uposition() + call The closest replacement is gtk_window_move(), and looking at the GTK + sources, appears to be what gtk_widget_set_uposition() calls + internally. We are still rather at the mercy of the user's window manager as to + whether it will honour the request we make, and arguably we ought to + remove this (mis-)feature anyway. + +2011-09-05 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * src/hid/gtk/gui-dialog.c: hid/gtk: Replace deprecated function + call gtk_box_pack_start_defaults() + +2011-09-05 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * src/hid/gtk/gtkhid-main.c: hid/gtk: Avoid the deprecated + gdk_drawable_get_display() Grab the active display using gdk_window_get_display() on the window + belonging to the drawing area. + +2011-09-05 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * src/hid/gtk/gtkhid-main.c: hid/gtk: Use the g_timeout_add() + function, not the deprecated GTK one. + +2011-09-05 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * src/hid/gtk/ghid-main-menu.c: hid/gtk: Fix not accessing + GtkMenuShell's children harder I missed a critical part of the fix from commit + 3584101f67f6ca2f0a252c312cb0c6c9c4fa016f + +2011-09-05 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * src/hid/gtk/gui-pinout-preview.c: hid/gtk: Replace + GTK_WIDGET_REALIZED() test with a check for window != NULL This avoids the use of the deprecated GTK_WIDGET_REALIZED macro, + without needing to use the GTK2.20 function + gtk_widget_get_realized(). The check for a NULL window should be + sufficient here I hope. + +2011-09-05 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * src/hid/gtk/gui-command-window.c: hid/gtk: Use gtk_bin_get_child() + accessor In GTK3.0, direct access to bin->child will be impossible. + +2011-09-05 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * src/hid/gtk/gui-config.c: hid/gtk: Use gtk_notebook_get_n_pages() + rather than diving in and counting In GTK3.0, direct access to notebook->children will be impossible. + +2011-09-05 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * src/hid/gtk/ghid-main-menu.c: hid/gtk: Don't access a + GtkMenuShell's children directly In GTK3.0, direct access to shell->children will be impossible. + +2011-09-05 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * src/hid/gtk/ghid-main-menu.c: hid/gtk: Free list returned from + gtk_container_get_children() We can (and should) g_list_free() the list of children returned when + we are finished with it. Whilst we are at it, convert the while loop to a for loop and use a + tighter condition on the loop termination test. The existing test + worked, but would leave a negative number in the object counter we + test against. This would not work if the object counters were ever + unsigned integers (as they might plausibly be). + +2011-09-05 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * src/hid/gtk/ghid-route-style-selector.c, + src/hid/gtk/gtkhid-main.c, src/hid/gtk/gui-dialog-print.c, + src/hid/gtk/gui-dialog.c, src/hid/gtk/gui-library-window.c, + src/hid/gtk/gui-utils.c: hid/gtk: Use accessors to get the vbox from + GtkDialog In GTK3.0, direct access to dialog->vbox will be impossible. + +2011-09-05 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * src/hid/gtk/gui-output-events.c: hid/gtk: Use accessor functions + for handling GtkAdjustments In GTK3.0, direct access to these member variables will be + impossible. + +2011-09-05 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * src/hid/gtk/gui-config.c, src/hid/gtk/gui-top-window.c: hid/gtk: + Don't use GTK_WIDGET_SET_FLAGS() Call the appropriate setter function instead. (For GTK3.0 + compatibility). + +2011-09-05 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * src/hid/gtk/gui-library-window.c: hid/gtk: Don't test for NOOP + before calling gtk_widget_set_sensitive() We were using a deprecated test macro anyway, GTK already does a + NOOP test inside gtk_widget_set_sensitive(). + +2011-09-05 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * src/hid/gtk/gui-utils.c, src/hid/gtk/gui.h: hid/gtk: Remove unused + function ghid_button_set_text() + +2011-09-05 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * src/hid/gtk/gui-utils.c, src/hid/gtk/gui.h: hid/gtk: Remove unused + function ghid_button_active() + +2011-09-05 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * src/hid/gtk/gtkhid-gdk.c, src/hid/gtk/gui-drc-window.c: hid/gtk: + Use gtk_widget_get_style() accessor, rather than direct access In GTK3.0, direct access to widget->style will be impossible. Swap out the GTK_WIDGET_STATE() macro for gtk_widget_get_state(), + which does not directly access the GSeal'd member widget->state. + +2011-09-05 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * src/hid/gtk/gtkhid-gdk.c, src/hid/gtk/gtkhid-main.c, + src/hid/gtk/gui-misc.c, src/hid/gtk/gui-output-events.c, + src/hid/gtk/gui-pinout-preview.c, src/hid/gtk/gui-top-window.c, + src/hid/gtk/gui-utils.c: hid/gtk: Use gtk_widget_get_window() + accessor In GTK3.0, direct access to widget->window will be impossible. + +2011-09-05 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * src/hid/gtk/gtkhid-gl.c, src/hid/gtk/gui-drc-window.c, + src/hid/gtk/gui-keyref-window.c, src/hid/gtk/gui-library-window.c, + src/hid/gtk/gui-log-window.c, src/hid/gtk/gui-netlist-window.c, + src/hid/gtk/gui-top-window.c: hid/gtk: Use + gtk_widget_get_allocation() accessor In GTK3.0, direct access to widget->allocation will be impossible. + +2011-09-05 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * src/hid/gtk/gtkhid-gdk.c, src/hid/gtk/gtkhid-gl.c: hid/gtk: Use + gtk_widget_get_allocation() not gdk_window_get_geometry() This avoids an unnecessary round-trip the the X server on X11 + platforms. + +2011-09-05 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * src/hid/gtk/gtkhid-gdk.c: hid/gtk: Avoid warning caused by early + drawing before gport->pixmap is set Avoids a command line warning: (pcb:28876): Gdk-CRITICAL **: IA__gdk_draw_drawable: assertion + `GDK_IS_DRAWABLE (src)' failed With the GDK renderer in use. This trigger appears to be some state changes triggered as the new + layer selector widget initialises. + +2011-09-05 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * src/hid/gtk/gui-misc.c: hid/gtk: Clean and make + gport_set_cursor_type() more GTK3.0 compatible Also removes the DEFAULT_CURSOR return value (for the case of no + window being setup) to GDK_X_CURSOR (the 0 enum value), as the code + path which returned DEFAULT_CURSOR would never have been hit. + +2011-09-05 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * src/hid/gtk/ghid-cell-renderer-visibility.c: hid/gtk: Use + gtk_cell_renderer_get_{align,pad} accessors In GTK3.0, direct access to these fields will be impossible. + +2011-09-05 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * src/hid/gtk/gui-top-window.c: hid/gtk: Avoid double-destroying the + file-changed info_bar on "Reload" This was caused by an addition I made in the earlier patch to + destroy the info_bar when the user manually reverts or loads a new + file). The callback on revert button was trying to delete it (again) after + the revert _action_ we call triggered a destroy of the widget. Avoid + this by destroying the info_bar before we call the revert action. + +2011-09-05 Andrew Poelstra * asp11 AT sfu dot ca * + + * src/hid/gtk/ghid-layer-selector.c: gtk: use + gtk_action_block_activate() in layer selector The GHidLayerSelector widget now uses gtk_action_block_activate() + instead of storing/blocking signal IDs. This is the proper way to + suppress signal emission since 2.16. This also fixes the lockup bug that was supposed to be fixed by the + recent commit 8857757, but still occured when using the menus to + toggle layers. + +2011-09-05 DJ Delorie * dj AT delorie dot com * + + * src/const.h, src/draw.c, src/misc.c, src/print.c, src/report.c: + Fix text scaling exceeding Coord max. The old way of scaling text was to multiply by scale/100 but this + could easily overflow on reasonably sized boards with a 32-bit Coord + type. The new code scales by (double)scale/100.0 instead. Since we + don't store scaled values in the PCB file, a loss of precision won't + matter, but a double has 53 bits of precision - in nanometers, + that's a board about the size of North America. Closes-bug: lp-832451 + +2011-09-05 DJ Delorie * dj AT delorie dot com * + + * configure.ac, globalconst.h, src/global.h: Add configure selection + of 32/64 Coord type --enable-coord64 Force 64-bit coordinate types --enable-coord32 Force 32-bit coordinate types Defaults to "long" as before, but if you give one of the above, the + type changes to a suitable 32-bit or 64-bit type. Note that this is + only guaranteed to be the size you choose if you have + which most OSs provide, else the "int" and "long long" types are + used instead. + +2011-09-05 Andrew Poelstra * asp11 AT sfu dot ca * + + * src/hid/gtk/ghid-layer-selector.c: gtk: Fix "clicking on layer + selector separator bug" If you click on the selector between real and virtual layers in the + pcb layer selector, it will toggle the first layer. This patch + simply ignores the click. + +2011-09-05 Andrew Poelstra * asp11 AT sfu dot ca * + + * src/hid/gtk/ghid-layer-selector.c, src/hid/gtk/gui-top-window.c: + gtk: fix behavior when hiding the last visible layer When you try to toggle the last layer invisible, pcb should refuse + to let you do so, since something has to be selected, and we don't + allow selection of invisible layers. What actually happens is that pcb locks up. This patch fixes that. + +2011-09-05 Andrew Poelstra * asp11 AT sfu dot ca * + + * src/hid/gtk/gui-top-window.c: gtk: Force silk and rat layers + visible when they are selected. + +2011-09-05 Andrew Poelstra * asp11 AT sfu dot ca * + + * src/hid/gtk/ghid-route-style-selector.c, + src/hid/gtk/ghid-route-style-selector.h, src/hid/gtk/gtkhid-main.c: + Implement RouteStylesChanged action This action looks at the actual route-style settings (i.e., + Settings.LineThickness), and gives these to the route style + selector. The selector looks in its list and selects a style, if one + matches. Otherwise, it does nothing. + +2011-09-04 Andrew Poelstra * asp11 AT sfu dot ca * + + * src/hid/gtk/ghid-route-style-selector.c, + src/hid/gtk/ghid-route-style-selector.h, + src/hid/gtk/gui-command-window.c, src/hid/gtk/gui-top-window.c, + src/hid/gtk/gui.h: Add Ctrl+F1,F2,F3,... accelerators to route style + selector Since we now have three accelerator groups to worry about (those of + the layer selector, route style selector and main menu), I have + moved the hooking/unhooking code into two functions: ghid_install_accel_groups () ghid_remove_accel_groups () These should be used whenever accelerators need to be disabled, for + example, when the user has the command box active. + +2011-09-03 Andrew Poelstra * asp11 AT sfu dot ca * + + * src/hid/gtk/gui-top-window.c, src/hid/gtk/gui.h: Remove the last + of ghidgui->toggle_holdoff + +2011-09-03 Andrew Poelstra * asp11 AT sfu dot ca * + + * src/Makefile.am, src/hid/gtk/gtkhid-main.c, + src/hid/gtk/gui-dialog-size.c, src/hid/gtk/gui-top-window.c, + src/hid/gtk/gui.h: Replace old route style selector with + GHidRouteStyleSelector TODO: The RouteStylesChanged action is now very broken. Menu accelerators need to be installed + +2011-09-03 Andrew Poelstra * asp11 AT sfu dot ca * + + * src/hid/gtk/ghid-main-menu.c, src/hid/gtk/ghid-main-menu.h: + Introduce functions for GHidRouteStyleSelector handling to menu + +2011-09-03 Andrew Poelstra * asp11 AT sfu dot ca * + + * src/Makefile.am, src/hid/gtk/ghid-route-style-selector.c, + src/hid/gtk/ghid-route-style-selector.h: Introduce + GHidRouteStyleSelector widget, don't use it yet + +2011-09-04 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * src/hid/gtk/gui-top-window.c, src/hid/gtk/gui.h: hid/gtk: Add file + change notification for the currently open PCB If the file is modified on disk, a bar appears at the top of the PCB + area offering the user a choice as to whether they wish to reload + the board or cancel (do nothing). If the user has changes, and hits reload - they are prompted as to + whether they wish to throw away their changes. Requires GTK 2.18 or higher due to use of the GtkInfoBar widget. + +2011-09-05 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * configure.ac: Require GTK 2.18 or later for the GTK HID. This is for some new widgets, like the GtkInfoBar. + +2011-09-04 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * src/hid/gtk/gui-top-window.c, src/hid/gtk/gui.h: hid/gtk: Fix + styling of menubar area so it is consistent across its width This relies on some nasty tricks copying GtkStyle's between the + menubar widget and a new GtkEventBox widget we pack the top bar in + to give us a background to paint on. We also adjust the styles of + the coordinate read- out labels and frames to ensure they are + legible. There may still be some inconsistencies, as the coordinate selector + button is themed as if it were a toolbar button, hence the + colourings used may be designed to work with a different background + colour than we have. + +2011-09-04 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * src/hid/gtk/gui-top-window.c, src/hid/gtk/gui.h: hid/gtk: Create a + GtkToolbar of mode buttons for compact vertical mode Rather than packing our mode buttons into an hbox, use a proper + GtkToolbar so theming will match the rest of the user's desktop. This simplifies code to switch compact mode on and off, as we have + two distinct widgets to show / hide, rather than having to reparent + the mode buttons each time. It does, however mean we have to be careful not to double-trigger + events when keeping the two sets of mode buttons in sync with each + other, so that isn't ideal. In the longer term, we probably ought to split out the mode button + area on the left-hand toolbar as a separate self-contained widget. + +2011-09-03 Andrew Poelstra * asp11 AT sfu dot ca * + + * src/hid/gtk/ghid-cell-renderer-visibility.c: gtk: Prelight toggle + swatches in layer selector This brightens the layer visibility swatches subtly when the mouse + hovers over them. IMHO this improves the discoverability of the + widget without being distracting or misleading. + +2011-09-03 Andrew Poelstra * asp11 AT sfu dot ca * + + * src/hid/gtk/ghid-layer-selector.c: gtk: Don't gray out invisible + layers' text in the selector + +2011-09-03 Andrew Poelstra * asp11 AT sfu dot ca * + + * src/hid/gtk/ghid-layer-selector.c: gtk: toggle non-activatable + layers on click, without checking for swatch + +2011-09-03 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * src/hid/gtk/gui-config.c, src/hid/gtk/gui-top-window.c, + src/hid/gtk/gui.h: hid/gtk: Remove compact_vbox and compact_hbox + +2011-09-03 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * src/hid/gtk/gui-config.c, src/hid/gtk/gui-top-window.c, + src/hid/gtk/gui.h: hid/gtk: Always show the PCB name on the + title-bar, not the toolbar This saves space and reduces code complexity + +2011-09-03 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * src/hid/gtk/gui-top-window.c, src/hid/gtk/gui.h: hid/gtk: Don't + use a GtkEventBox as a container widget We weren't making use of the events from the event box, and appeared + just to be using it as a convenient container to allow setting the + sensitivity on our entire left hand toolbar at once. Scrap the event box widget and just store a pointer to the vbox + widget which the left toobar items are packed into. We can set the + sensitivity on this and get the desired effect. + +2011-09-03 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * src/hid/gtk/gui-pinout-window.c, src/hid/gtk/gui-top-window.c: + hid/gtk: Don't pack the drawing area in a GtkViewport widget (For both the main window and the pinout preview). The GtkViewport + widget is designed to add scroll bars to a widget which doesn't have + native scroll capabilities. We are handling out own scroll-bars, so + the only gain we had from the GtkViewport we added was a shadow + around the widget. If we decide we want the shadow back, a more appropriate widget to + pack the drawing area with might be a GtkFrame. + +2011-09-03 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * src/hid/gtk/gui-top-window.c: hid/gtk: Remove the vbox used to + pack ghidgui->compact_hbox The main effect here is that the contents of the compact_hbox will + get more vertical space assigned to them if the menu bar section is + taller than the natural size of those widgets. The visual change seems acceptable, and we could use every bit of + code-cleanup in ghid_build_pcb_top_window() + +2011-09-03 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * src/hid/gtk/gui-top-window.c: hid/gtk: Remove some more temporary + variable assignments These make the code harder to follow, as the same temporary variable + is used again and again to refer to different widgets. + +2011-09-03 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * src/hid/gtk/gui-top-window.c, src/hid/gtk/gui.h: hid/gtk: Don't + use an hbox to pack the board name label The hbox only has one child, so use the name label directly. + +2011-09-03 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * src/hid/gtk/gui-top-window.c: hid/gtk: Skip the generic "hbox" + variable when storing the widget anyway For widgets we keep references to in the ghidgui structure, we avoid + confusion by assigning directly to the more descriptive ghidgui + variable. + +2011-09-03 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * src/hid/gtk/gui-top-window.c: hid/gtk: Don't pack a frame around + the menu bar + +2011-09-02 Andrew Poelstra * asp11 AT sfu dot ca * + + * src/hid/gtk/gui-dialog-size.c, src/misc.c, src/misc.h: Move + make_route_string() from gtk into misc.c + +2011-09-02 Andrew Poelstra * asp11 AT sfu dot ca * + + * src/mymem.c, src/mymem.h: Const-correct StripWhiteSpaceAndDup in + mymem.c + +2011-09-01 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * src/hid/gtk/gtkhid-main.c: hid/gtk: Attempt to fix logic to flip + component / solder group visibility on flip Should get back to better behaviour. I probably broke this somewhat + with commit f903b4be6b85efc110852f7be40edf8245f0a513, which + attempted to re-state the previous logic in a clearer fashon. The logic now should: If flipping sides, and only ONE of the solder / component layers + (groups) is visible, and that layer (group) is _active_, then swap + the visibilities of the component / solder layers (groups), and make + the newly visible layer (group) active. There are still bugs in this code relating to the assumption that + the first entry in the layer group is the one which is being + toggled. This breaks if the first entry in the group is that + corresponding to the silk for that side of the board. + +2011-08-31 Andrew Poelstra * asp11 AT sfu dot ca * + + * src/hid/gtk/ghid-layer-selector.c: gtk: fix typo preventing layer + selector menu items from working + +2011-08-31 Andrew Poelstra * asp11 AT sfu dot ca * + + * src/hid/gtk/gui-top-window.c: gtk: remove in_toggle_view + recursion-prevention flag We don't call ToggleView programmatically anywhere, so it is + impossible for there to be recursion. + +2011-08-31 Andrew Poelstra * asp11 AT sfu dot ca * + + * src/hid/gtk/ghid-main-menu.c: Block signals in + ghid_main_menu_update_toggle_state() The function ghid_main_menu_update_toggle_state() is supposed to + sync the menu checkboxes to the actual state of pcb, by checking the + flags given in the resource file. If this function is emitting signals and changing pcb's state, this + is a bug. Fortunately, this appears not to be the case, so the + effect of this commit is to eliminate one more use of + ghidgui->toggle_holdoff. + +2011-08-31 Andrew Poelstra * asp11 AT sfu dot ca * + + * src/hid/gtk/gui-top-window.c: gtk: sync visiibility of layer + selector with core state in LayersChanged + +2011-08-31 Andrew Poelstra * asp11 AT sfu dot ca * + + * src/hid/gtk/ghid-layer-selector.c, + src/hid/gtk/ghid-layer-selector.h: Use signal blocking for + visibility toggling in GHidLayerSelector + +2011-08-31 Andrew Poelstra * asp11 AT sfu dot ca * + + * src/hid/gtk/gui-config.c: Add call to + ghid_layer_buttons_color_update() when loading new colors + +2011-08-30 Andrew Poelstra * asp11 AT sfu dot ca * + + * src/change.c: Change change.c to treat text scale as mils + +2011-08-30 Andrew Poelstra * asp11 AT sfu dot ca * + + * src/hid/gtk/ghid-layer-selector.c: Configure layer selector to + only accept left-clicks Suggested by Kai-Martin Knaak, seconded by me. + +2011-08-30 Andrew Poelstra * asp11 AT sfu dot ca * + + * src/hid/gtk/gui-top-window.c: Fix invalid free of ~/.pcb/filename + path in gui-top-window.c + +2011-08-29 Andrew Poelstra * asp11 AT sfu dot ca * + + * src/hid/gtk/ghid-layer-selector.c, + src/hid/gtk/ghid-layer-selector.h: minor: fix comment and forward + declaration in ghid-layer-selector + +2011-08-29 Andrew Poelstra * asp11 AT sfu dot ca * + + * src/hid/gtk/ghid-layer-selector.c: Remove default layer selection + from ghid-layer-selector.c Having the layer selector select its own first layer is not needed - + pcb does this for us, after making the widget. It's not the sort of + decision a widget should be making on its own, anyway. + +2011-08-29 Andrew Poelstra * asp11 AT sfu dot ca * + + * src/hid/gtk/ghid-layer-selector.c: Use g_signal_handler_block + instead of flags in ghid-layer-selector.c Thanks to Peter C. for this code-cleanliness tip. Now the two + layer-selection interfaces (menu button and selector widget) set + each other's GUI state but do not raise any signals past the + original. + +2011-08-29 Andrew Poelstra * asp11 AT sfu dot ca * + + * src/hid/gtk/ghid-layer-selector.c: Add missing free_ldata() in + ghid-layer-selector.c + +2011-08-29 Andrew Poelstra * asp11 AT sfu dot ca * + + * src/hid/gtk/gui-command-window.c: Disable layer selector's + GtkAccelGroup while in command mode + +2011-08-30 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * src/draw.c: draw.c: Add const qualifiers to some BoxType + *drawn_area parameters + +2011-08-30 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * src/misc.c, src/misc.h: misc.c: Add const qualifier to BoxType * + parameter passed to CountHoles + +2011-08-30 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * src/draw.c: draw.c: Fold DrawLayerCommon() into DrawLayer() Since the last commit, DrawLayer() just calls DrawLayerCommon with + the "clear_pins" argument set to true. The only other + DrawLayerCommon caller passes clear_pins as true, so having + functions is redundant. + +2011-08-30 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * src/draw.c: DrawLayer(): Pass true to clear_pins of + DrawLayerCommon This should not affect any rendering. If the check planes flag is + set, we should only draw polygons, nothing more. Only a handful of + cases draw layers via this code-path, and in all but the exporter + cases, they are not called if CHECKPLANES is set. The exporters which call DrawLayer explicitly clear the CHECKPLANES + flag (since commit 3c01bd38cb59922692408b71cd5d77892dbe6ade), so + nothing should be affected by this argument change. + +2011-08-30 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * src/hid/gerber/gerber.c, src/hid/ps/eps.c, src/hid/ps/ps.c: + hid/{ps,eps,gerber}: Clear CHECKPLANESFLAG before exporting Ensure we are in a sensible view state before exporting. This update + those HIDs which cleared other similar renedering flags before + exporting to include the CHECKPLANES flag. + +2011-08-30 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * src/draw.c: draw.c: Have DrawLayerGroup() call DrawPPV for non-gui + exporters This means DrawLayerGroup() can have a void return type as most of + the other drawing functions, and makes things a little neater. Only the GUI renderers special case the pin / pad / via to wait + until a later rendering oass than the layers they reside on. + +2011-08-29 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * src/hid/gtk/gtkhid-main.c: hid/gtk: Remove unused "button" + parameter from Popup function. Remove the dead code and comments refering to the fact the + function's second argument indicates a mouse button number. + +2011-08-29 Andrew Poelstra * asp11 AT sfu dot ca * + + * src/hid/gtk/ghid-layer-selector.c, + src/hid/gtk/ghid-layer-selector.h, src/hid/gtk/ghid-main-menu.c, + src/hid/gtk/ghid-main-menu.h, src/hid/gtk/gui-top-window.c: Link + GHidLayerSelector and GHidMainMenu Layer visibility-toggle and selection menu items now appear in the + main menu. Accelerators work correctly and are reassigned on + deletion/addition of layers to simulate the old behavior. + +2011-08-29 Andrew Poelstra * asp11 AT sfu dot ca * + + * src/hid/gtk/ghid-layer-selector.c: Clean up layer data handling in + ghid-layer-selector.c + +2011-08-29 Andrew Poelstra * asp11 AT sfu dot ca * + + * src/hid/gtk/ghid-layer-selector.c: Give GHidLayerSelector an + internal layer structure Before we had various arrays to resize and index; now each row has a + structure associated with it, that is easier to access and maintain. + +2011-08-28 Andrew Poelstra * asp11 AT sfu dot ca * + + * src/hid/gtk/gtkhid-main.c, src/hid/gtk/gui-command-window.c, + src/hid/gtk/gui-output-events.c, src/hid/gtk/gui-top-window.c, + src/hid/gtk/gui.h: Replace gtk UI manager with GHidMainMenu widget This commit replaces the old UI manager with a customize gtk widget + that builds menus directly from a resource tree. This eliminates the + translate-to-XML step, the ugly hacks used to access individual + actions, and all the associated manual memory management. This will also give us the ability to have more dynamic menus, in + particular layer lists without maximum capacities. Layers and route styles are still not hooked into the menu. This + means that those accelerators DO NOT WORK. (This will be fixed in a + later commit.) Checkboxes have been replaced with radio buttons + where appropriate. There are now tearoffs on the context-menu's + submenus. Other than that, there should be no user-visible changes. ;) + +2011-08-28 Andrew Poelstra * asp11 AT sfu dot ca * + + * src/Makefile.am, src/hid/gtk/ghid-main-menu.c, + src/hid/gtk/ghid-main-menu.h: Created ghid-main-menu.[ch] Still need to hook up layer selector and route styles. + +2011-08-29 Andrew Poelstra * asp11 AT sfu dot ca * + + * src/hid/gtk/gui-top-window.c: Fix select-hidden-layer behavior When you select a hidden layer, it should toggle the visibility so + that the currently-selected layer is always visible. We were + toggling twice. + +2011-08-29 Andrew Poelstra * asp11 AT sfu dot ca * + + * src/hid/gtk/ghid-layer-selector.c, src/hid/gtk/gui-top-window.c: + Prevent recursion in layer selector events + +2011-08-29 Andrew Poelstra * asp11 AT sfu dot ca * + + * src/Makefile.am, src/hid/gtk/ghid-coord-entry.c, + src/hid/gtk/ghid-coord-entry.h, src/hid/gtk/gtk-pcb-coord-entry.c, + src/hid/gtk/gtk-pcb-coord-entry.h, src/hid/gtk/gui-config.c, + src/hid/gtk/gui-dialog-print.c, src/hid/gtk/gui-dialog-size.c, + src/hid/gtk/gui-utils.c, src/hid/gtk/gui.h: Rename GtkPcbCoordEntry + to GHidCoordEntry + +2011-08-29 Andrew Poelstra * asp11 AT sfu dot ca * + + * src/Makefile.am, src/hid/gtk/ghid-layer-selector.c, + src/hid/gtk/ghid-layer-selector.h, + src/hid/gtk/gtk-pcb-layer-selector.c, + src/hid/gtk/gtk-pcb-layer-selector.h, src/hid/gtk/gui-top-window.c: + Rename GtkPcbLayerSelector to GHidLayerSelector + +2011-08-29 Andrew Poelstra * asp11 AT sfu dot ca * + + * src/Makefile.am, src/hid/gtk/ghid-cell-renderer-visibility.c, + src/hid/gtk/ghid-cell-renderer-visibility.h, + src/hid/gtk/gtk-pcb-cell-renderer-visibility.c, + src/hid/gtk/gtk-pcb-cell-renderer-visibility.h, + src/hid/gtk/gtk-pcb-layer-selector.c: Rename + GtkPcbCellRendererVisibility to GHidCellRendererVisibility + +2011-08-28 Andrew Poelstra * asp11 AT sfu dot ca * + + * src/gpcb-menu.res.in: Add mnemonics to menus in default + gpcb-menu.res.in You can now access the main menu without a mouse, by doing Alt+F, + for example, to select the File menu. + +2011-08-27 Andrew Poelstra * asp11 AT sfu dot ca * + + * src/hid/common/hid_resource.c, src/hid/common/hid_resource.h, + src/hid/gtk/gui-top-window.c, src/res_parse.y, src/resource.h: gtk: + Const-correct add_resource_to_menu and related functions Five files have had const keywords added: ../common/hid_resource.c ../common/hid_resource.h gui-top-window.c ../../res_parse.y ../../resource.h No casts were added. No compilation warnings were added. + +2011-08-27 Andrew Poelstra * asp11 AT sfu dot ca * + + * src/hid/gtk/gtk-pcb-layer-selector.c: Delete GtkAction along with + layer in gtk-pcb-layer-selector.c + +2011-08-29 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * src/hid/ps/eps.c: hid/ps/eps.c: Remove assigned by unused + lastgroup variable + +2010-10-21 Markus Hitter * mah AT jump-ing dot de * + + * src/hid/gcode/gcode.c: HID-gcode: make use of MAXPATHLEN. Affects-bug: lp-699497 + +2011-08-28 Felix Ruoff * Felix AT posaunenmission dot de * + + * src/hid/bom/bom.c, src/hid/gerber/gerber.c, src/main.c: Add + attributes to docu for commandline options + +2011-08-28 Felix Ruoff * Felix AT posaunenmission dot de * + + * doc/pcb.texi: Docu: Fix some references to command-line options and remove the documentation for a non-working X11-Interface option. + +2011-08-28 Dima Kogan * dkogan AT cds dot caltech dot edu * + + * src/find.c: Better handling of unplated vias The attached patch adds checks in the geometry intersection + functions to no longer treat unplated vias (mounting holes) as + conducting. The implementation in the patch will act as if the + unplated via doesn't intersect with metal objects at all, which is + possibly not what is desired. Should the conductivity check happen + on a higher level from the geometry intersection routines? A case + that would require this is not obvious to me. Closes-bug: lp-699499 + +2011-08-14 Felix Ruoff * Felix AT posaunenmission dot de * + + * src/hid/gcode/gcode.c, src/hid/gerber/gerber.c, + src/hid/lpr/lpr.c, src/hid/nelma/nelma.c, src/hid/png/png.c, + src/hid/ps/ps.c: Unify HID description (no fullstop at end of + description) Most parts of this patch-serie was written by Kai-Martin Knaak. + Adaption to actual git HEAD and some modifications by Felix Ruoff. + +2011-08-14 Felix Ruoff * Felix AT posaunenmission dot de * + + * src/hid/ps/ps.c: Add docu for ps HID commandline options Most parts of this patch-serie was written by Kai-Martin Knaak. + Adaption to actual git HEAD and some modifications by Felix Ruoff. + +2011-08-14 Felix Ruoff * Felix AT posaunenmission dot de * + + * src/hid/ps/eps.c: Add docu for eps HID commandline options Most parts of this patch-serie was written by Kai-Martin Knaak. + Adaption to actual git HEAD and some modifications by Felix Ruoff. + +2011-08-14 Felix Ruoff * Felix AT posaunenmission dot de * + + * src/hid/png/png.c: Add docu for png HID commandline options Most parts of this patch-serie was written by Kai-Martin Knaak. + Adaption to actual git HEAD and some modifications by Felix Ruoff. + +2011-08-14 Felix Ruoff * Felix AT posaunenmission dot de * + + * src/hid/nelma/nelma.c: Add docu for nemla HID commandline options Most parts of this patch-serie was written by Kai-Martin Knaak. + Adaption to actual git HEAD and some modifications by Felix Ruoff. + +2011-08-14 Felix Ruoff * Felix AT posaunenmission dot de * + + * src/hid/lpr/lpr.c: Add docu for lpt HID commandline options Most parts of this patch-serie was written by Kai-Martin Knaak. + Adaption to actual git HEAD and some modifications by Felix Ruoff. + +2011-08-14 Felix Ruoff * Felix AT posaunenmission dot de * + + * src/hid/gerber/gerber.c: Add docu for Gerber HID commandline + options Most parts of this patch-serie was written by Kai-Martin Knaak. + Adaption to actual git HEAD and some modifications by Felix Ruoff. + +2011-08-14 Felix Ruoff * Felix AT posaunenmission dot de * + + * src/hid/bom/bom.c: Add docu for the BOM HID commandline options Most parts of this patch-serie was written by Kai-Martin Knaak. + Adaption to actual git HEAD and some modifications by Felix Ruoff. + +2011-08-14 Felix Ruoff * Felix AT posaunenmission dot de * + + * src/hid/gtk/gui-top-window.c, src/hid/lesstif/main.c: Add docu for + commandline-options for GTK+ and lesstif GUI Most parts of this patch-serie was written by Kai-Martin Knaak. + Adaption to actual git HEAD and some modifications by Felix Ruoff. + +2011-08-18 Felix Ruoff * Felix AT posaunenmission dot de * + + * src/main.c: Add docu for DRC commandline options Most parts of this patch-serie was written by Kai-Martin Knaak. + Adaption to actual git HEAD and some modifications by Felix Ruoff. + +2011-08-18 Felix Ruoff * Felix AT posaunenmission dot de * + + * src/main.c: Add docu for general gui commandline options Most parts of this patch-serie was written by Kai-Martin Knaak. + Adaption to actual git HEAD and some modifications by Felix Ruoff. + +2011-08-18 Felix Ruoff * Felix AT posaunenmission dot de * + + * src/main.c: Add docu for path commandline options Most parts of this patch-serie was written by Kai-Martin Knaak. + Adaption to actual git HEAD and some modifications by Felix Ruoff. + +2011-08-18 Felix Ruoff * Felix AT posaunenmission dot de * + + * src/main.c: Add docu for commandline commands Most parts of this patch-serie was written by Kai-Martin Knaak. + Adaption to actual git HEAD and some modifications by Felix Ruoff. + +2011-08-18 Felix Ruoff * Felix AT posaunenmission dot de * + + * src/main.c: Add docu for layer names commandline options Most parts of this patch-serie was written by Kai-Martin Knaak. + Adaption to actual git HEAD and some modifications by Felix Ruoff. + +2011-08-18 Felix Ruoff * Felix AT posaunenmission dot de * + + * src/main.c: Add docu for size commandline options Most parts of this patch-serie was written by Kai-Martin Knaak. + Adaption to actual git HEAD and some modifications by Felix Ruoff. + +2011-08-18 Felix Ruoff * Felix AT posaunenmission dot de * + + * src/main.c: Add docu for color commandline options Most parts of this patch-serie was written by Kai-Martin Knaak. + Adaption to actual git HEAD and some modifications by Felix Ruoff. + +2011-08-28 Felix Ruoff * Felix AT posaunenmission dot de * + + * doc/pcb.texi, src/main.c: Docu: Add general description for + commandline options ... and for general options. (Patch 3/19 of this patch-serie is + missing on purpose) Most parts of this patch-serie was written by Kai-Martin Knaak. + Adaption to actual git HEAD and some modifications by Felix Ruoff. + +2011-08-28 Felix Ruoff * Felix AT posaunenmission dot de * + + * doc/pcb.texi: Remove out-dated docu for commandline options Most parts of this patch-serie was written by Kai-Martin Knaak. + Adaption to actual git HEAD and some modifications by Felix Ruoff. + +2011-08-28 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * src/draw.c, src/misc.c, src/misc.h: Move CountHoles() from draw.c + to misc.c and export it This function may be more generally useful. + +2011-08-28 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * src/draw.c: draw.c: Move doing_assy flag assignment into + PrintAssembly() Keeps things tidier + +2011-08-28 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * src/hid/gcode/gcode.c, src/hid/nelma/nelma.c: hid/{nelma,gcode}: + Remove assigned but unused variables lastcap and lastgroup + +2011-08-28 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * src/draw.h, src/main.c: Remove traces of LoadBackgroundImage() + from the core of PCB + +2011-08-27 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * src/hid/gtk/gtkhid-gdk.c, src/hid/gtk/gtkhid-gl.c: hid/gtk: Use + view_data struct to simplify saving and restoring views + +2011-08-27 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * src/hid/gtk/gtkhid-gdk.c, src/hid/gtk/gtkhid-gl.c, + src/hid/gtk/gtkhid-main.c, src/hid/gtk/gui-output-events.c, + src/hid/gtk/gui-top-window.c, src/hid/gtk/gui.h: hid/gtk: + Encapsulate view parameters in a structure + +2011-08-27 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * src/hid/gtk/gtkhid-main.c: hid/gtk: Remove unnecessary prototype + +2011-08-27 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * src/hid/gtk/gui.h: hid/gtk: crosshair_{x,y} should be Coord, not + int. + +2011-08-27 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * src/fontmode.c: fontmode.c: Add missing #include "pcb-printf.h" + +2011-08-26 DJ Delorie * dj AT delorie dot com * + + * src/fontmode.c: Fix FontEdit() Move top/bottom meta-layers to layers 0 and 1 so they'll exist after + we trim out the layers. Set up DRC values to avoid interfereing + with the font layout. Closes-bug: lp-808591 + +2011-08-26 DJ Delorie * dj AT delorie dot com * + + * src/hid/lesstif/dialogs.c: Use correct units when setting up the + Sizes dialog. Replace %mm with %mS so it auto-selects units, to match the scanning + that's done when you save the settings. + +2011-08-26 DJ Delorie * dj AT delorie dot com * + + * src/parse_l.l: Avoid segfault tmp-saving partial board. Check for both PCB and PCB->Data to avoid trying to save a backup + copy of a partially created layout. + +2011-08-26 Andrew Poelstra * asp11 AT sfu dot ca * + + * src/hid/gtk/gui-top-window.c: gtk: Sync selection with pcb state + in ghid_layer_buttons_update It was possible for PCB's active layer to come out of sync with the + selected entry in the layer selector. This fixes that. + +2011-08-26 Andrew Poelstra * asp11 AT sfu dot ca * + + * src/hid/gtk/gtk-pcb-layer-selector.c, + src/hid/gtk/gtk-pcb-layer-selector.h, src/hid/gtk/gui-top-window.c: + Support adding/deletion of layers in GtkPcbLayerSelector If you add a layer to a GtkPcbLayerSelector, and its ID is already + in the selector, it will update the layer instead of adding a new + one. This way, we can update the layer selector by: 1. Deleting all recently-deleted and non-copper layers. 2. Re-adding all layers (including new ones) 3. Re-adding all non-copper layers (so they go to the end) The old layer selector maintained MAX_LAYER + n layers (where n was + the number of non-copper layers), and showed/hid the gui widget to + managed deletion and adding of layers. The new one has no notion of + MAX_LAYER, nor does it care whether a layer is copper or not. :) + +2011-08-26 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * src/hid/gtk/gui-drc-window.c: hid/gtk: Fix DRC preview pixmap + rendering Another hard-coded constant in the old PCB coordinate system + +2011-08-26 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * src/hid/gtk/gtkhid-gdk.c: hid/gtk: Remove duplicated render pass + in ghid_pinout_preview_expose() This looks like it was a copy+paste error. + +2011-08-26 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * src/hid/gtk/gui-pinout-preview.c, + src/hid/gtk/gui-pinout-preview.h: hid/gtk: Fix pinout preview + default zoom after unit conversion Apparently the scale factor equation was dependant on the old PCB + units of 100th mils to produce a sensible zoom level. Since this code is monumentally obtuse, just re-write something + completley new. The old code probably bit-rot when we split out the + rendering widget. Lets just suggest a fixed size of 100 pixels natural size for each + 150 mil of element bounding box. That seems to work nicely. + +2011-08-26 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * src/misc.c: misc.c: Rework SetTextBoundingBox() to make it more + clear how it works. Add lots of comments, change the coding style and rename variables + to make them more obvious. + +2011-08-26 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * src/draw.c: Redefine pin / pad name label text size in terms of + FONT_CAPHEIGHT This reduces the proliferation of various "magic numbers" which + combine constants from several sources and aren't appearent why they + are a particular number. There is a slight rounding error in the + converted pin label size, but it is insignificant. + +2011-08-26 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * globalconst.h, src/change.c, src/report.c: Introduce global + #define for the text cap-height of the PCB font. This should save the proliferation of rather opaque + MIL_TO_COORD(45)'s in various places. + +2011-08-26 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * src/change.c, src/draw.c, src/report.c: Fix some text scale + factors This commit fixes pin / pad name drawing, the pinout preview and two + actions which change the size of text based on user input. To recap: Text->Scale is a percentage scaling (from the font definition). The + default font has has an approximate cap-height of 45-50 mils, and + PCB assumes this to be the case. Text->Scale is not a Coord, it is an integer, so use int as the + resulting type for any calculations involving this number. (100% is + stored as 100 in Text->scale). Code which scales text based upon + other object sizes does so by dividing to a dimensionless scale + factor. We may have to be careful about the width of intermediate + results when scaling based on Coords if Coord is changed to 64bit at + some point. ChangeTextSize() and ChangeElementNameSize accept absolute (or + delta) sizes in units of distance. These are converted to a Scale by + assuming a 100% scaled font is 45mils high. YMMV. Oh - and just to note.. the line-thickness is drawn at half the + width stored in the font definition. This is clearly bonkers, but we + would break designs if we changed it now. Grr. (Thanks a bunch + commit 66592387176ba2578dfc14023a6fe49226f3a3df). + +2011-08-26 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * src/action.c, src/hid/ps/ps.c: action.c: Fix missing #include + "mirror.h" + +2011-08-26 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * : hid/ps: Fix inaccurate comment and twiddle some whitespace The whitespace changes in the if statement were from an earlier + revision which actually had functional changes - but I prefer this + way, so I'm committing it anyway. Also adds some != 0 to the end of strcmp tests, as I believe this + aids clarity by reminding readers strcmp returns 0 for a match. + +2011-08-26 Peter Clifton * pcjc2 AT cam dot ac dot uk * + + * src/hid/gtk/gtkhid-main.c, src/hid/gtk/gui-output-events.c: + hid/gtk: Allow zooming out past the board size (up to 1/