summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2012-03-10 11:46:08 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2012-03-10 11:46:08 +0000
commitd8dc8cabf54af6442bf5e978e017d0727d694732 (patch)
tree9069c96e68ef71c5cfe2deb3d604428ef693c165
parent963a564de500eee52ed2949e45c1cb12fc94fef9 (diff)
Update to bitmap 1.0.6
-rw-r--r--app/bitmap/BitEdit.c255
-rw-r--r--app/bitmap/Bitmap.c613
-rw-r--r--app/bitmap/Bitmap.h18
-rw-r--r--app/bitmap/BitmapP.h16
-rw-r--r--app/bitmap/ChangeLog187
-rw-r--r--app/bitmap/CutPaste.c40
-rw-r--r--app/bitmap/Dialog.c52
-rw-r--r--app/bitmap/Graphics.c478
-rw-r--r--app/bitmap/Handlers.c302
-rw-r--r--app/bitmap/Makefile.am10
-rw-r--r--app/bitmap/Makefile.in25
-rw-r--r--app/bitmap/ReqMach.c68
-rw-r--r--app/bitmap/Requests.h10
-rw-r--r--app/bitmap/aclocal.m4725
-rw-r--r--app/bitmap/app-defaults/Bitmap6
-rw-r--r--app/bitmap/app-defaults/Bitmap-nocase6
-rw-r--r--app/bitmap/atobm.c36
-rw-r--r--app/bitmap/bmtoa.c39
-rw-r--r--app/bitmap/config.h.in9
-rw-r--r--app/bitmap/configure10265
-rw-r--r--app/bitmap/configure.ac36
-rw-r--r--app/bitmap/man/Makefile.in9
-rw-r--r--app/bitmap/man/bitmap.man2
23 files changed, 11416 insertions, 1791 deletions
diff --git a/app/bitmap/BitEdit.c b/app/bitmap/BitEdit.c
index 60ef2abc9..64c2e56e8 100644
--- a/app/bitmap/BitEdit.c
+++ b/app/bitmap/BitEdit.c
@@ -46,12 +46,11 @@ from The Open Group.
#include <X11/Xaw/SimpleMenu.h>
#include <X11/Xaw/SmeLine.h>
#include <X11/Xaw/SmeBSB.h>
-#include <X11/Xmu/SysUtil.h>
#include "Bitmap.h"
#include <X11/bitmaps/xlogo16>
-static char *usage = "[-options ...] filename\n\
+static const char *usage = "[-options ...] filename\n\
\n\
where options include all standard toolkit options plus:\n\
-size WIDTHxHEIGHT\n\
@@ -209,14 +208,14 @@ static ButtonRec buttons[] = {
#include "Dialog.h"
-static Widget
- top_widget,
+static Widget
+ top_widget,
parent_widget,
formy_widget,
fileMenu_widget,
editMenu_widget,
status_widget,
- pane_widget,
+ pane_widget,
form_widget,
bitmap_widget,
image_shell,
@@ -279,7 +278,7 @@ static XtActionsRec actions_table[] = {
static Atom wm_delete_window;
-static void
+static void
FixImage(void)
{
Pixmap old_image, image;
@@ -287,14 +286,14 @@ FixImage(void)
Arg wargs[2];
if (!image_visible) return;
-
+
n=0;
XtSetArg(wargs[n], XtNbitmap, &old_image); n++;
XtGetValues(normal_image_widget, wargs, n);
-
-
+
+
image = BWGetUnzoomedPixmap(bitmap_widget);
-
+
n=0;
XtSetArg(wargs[n], XtNbitmap, image); n++;
XtSetValues(normal_image_widget, wargs, n);
@@ -304,7 +303,7 @@ FixImage(void)
XFreePixmap(XtDisplay(bitmap_widget), old_image);
}
-static void
+static void
FixStatus(void)
{
int n;
@@ -326,14 +325,14 @@ FixStatus(void)
/*XtFree(str); */
}
-static void
+static void
FixUp(void)
{
FixImage();
FixStatus();
}
-static void
+static void
FixEntry(Widget w, int *id)
{
int n;
@@ -341,41 +340,41 @@ FixEntry(Widget w, int *id)
Time dummy = 0;
n = 0;
-
+
switch (*id) {
-
+
case Image:
- XtSetArg(wargs[n], XtNleftBitmap,
+ XtSetArg(wargs[n], XtNleftBitmap,
image_visible ? check_mark : None); n++;
break;
-
+
case Grid:
- XtSetArg(wargs[n], XtNleftBitmap,
+ XtSetArg(wargs[n], XtNleftBitmap,
BWQueryGrid(bitmap_widget) ? check_mark : None); n++;
break;
-
+
case Dashed:
- XtSetArg(wargs[n], XtNleftBitmap,
+ XtSetArg(wargs[n], XtNleftBitmap,
BWQueryDashed(bitmap_widget) ? check_mark : None); n++;
break;
-
+
case Axes:
- XtSetArg(wargs[n], XtNleftBitmap,
+ XtSetArg(wargs[n], XtNleftBitmap,
BWQueryAxes(bitmap_widget) ? check_mark : None); n++;
break;
-
+
case Stippled:
- XtSetArg(wargs[n], XtNleftBitmap,
+ XtSetArg(wargs[n], XtNleftBitmap,
BWQueryStippled(bitmap_widget) ? check_mark : None); n++;
break;
-
+
case Proportional:
- XtSetArg(wargs[n], XtNleftBitmap,
+ XtSetArg(wargs[n], XtNleftBitmap,
BWQueryProportional(bitmap_widget) ? check_mark : None); n++;
break;
-
+
case Zoom:
- XtSetArg(wargs[n], XtNleftBitmap,
+ XtSetArg(wargs[n], XtNleftBitmap,
BWQueryZooming(bitmap_widget) ? check_mark : None); n++;
break;
@@ -385,27 +384,27 @@ FixEntry(Widget w, int *id)
break;
case Paste:
- XtSetArg(wargs[n], XtNsensitive,
+ XtSetArg(wargs[n], XtNsensitive,
BWQuerySelection(bitmap_widget, dummy)); n++;
break;
default:
return;
}
-
+
XtSetValues(w, wargs, n);
}
/* ARGSUSED */
-void FixMenu(Widget w,
- XEvent *event,
- String *params,
+void FixMenu(Widget w,
+ XEvent *event,
+ String *params,
Cardinal *num_params)
{
int i;
btime = event->xbutton.time;
-
+
for (i = 0; i < XtNumber(edit_menu); i++)
FixEntry(edit_menu[i].widget, &edit_menu[i].id);
}
@@ -413,14 +412,14 @@ void FixMenu(Widget w,
static int zero = 0;
#define Plain (char *)&zero,sizeof(int)
/* ARGSUSED */
-static void
+static void
TheCallback(Widget w, /* not used */
- XtPointer clientData,
+ XtPointer clientData,
XtPointer callData)
{
int *id = (int *)clientData;
switch (*id) {
-
+
case New:
DoNew();
break;
@@ -428,19 +427,19 @@ TheCallback(Widget w, /* not used */
case Load:
DoLoad();
break;
-
+
case Insert:
DoInsert();
break;
-
+
case Save:
DoSave();
break;
-
+
case SaveAs:
DoSaveAs();
break;
-
+
case Resize:
DoResize();
break;
@@ -456,7 +455,7 @@ TheCallback(Widget w, /* not used */
case Basename:
DoBasename();
break;
-
+
case Image:
SwitchImage();
break;
@@ -464,53 +463,53 @@ TheCallback(Widget w, /* not used */
case Grid:
SwitchGrid();
break;
-
+
case Dashed:
SwitchDashed();
break;
case Axes:
SwitchAxes();
- break;
+ break;
case Stippled:
SwitchStippled();
break;
-
+
case Proportional:
SwitchProportional();
break;
-
+
case Zoom:
SwitchZoom();
break;
-
+
case Cut:
DoCut();
break;
-
+
case Copy:
DoCopy();
break;
-
+
case Paste:
DoPaste();
break;
-
+
case Clear:
BWStoreToBuffer(bitmap_widget);
BWClear(bitmap_widget);
BWChangeNotify(bitmap_widget);
BWSetChanged(bitmap_widget);
break;
-
+
case Set:
BWStoreToBuffer(bitmap_widget);
BWSet(bitmap_widget);
BWChangeNotify(bitmap_widget);
BWSetChanged(bitmap_widget);
break;
-
+
case Invert:
BWStoreToBuffer(bitmap_widget);
BWInvert(bitmap_widget);
@@ -538,7 +537,7 @@ break;
BWAddRequest(bitmap_widget, CopyRequest, True, Plain);
}
break;
-
+
case MoveImm:
BWRemoveAllRequests(bitmap_widget);
if (BWQueryMarked(bitmap_widget)) {
@@ -550,70 +549,70 @@ break;
BWAddRequest(bitmap_widget, MoveRequest, True, Plain);
}
break;
-
+
case Up:
BWStoreToBuffer(bitmap_widget);
BWUp(bitmap_widget);
BWChangeNotify(bitmap_widget);
BWSetChanged(bitmap_widget);
break;
-
+
case Down:
BWStoreToBuffer(bitmap_widget);
BWDown(bitmap_widget);
BWChangeNotify(bitmap_widget);
BWSetChanged(bitmap_widget);
break;
-
+
case Left:
BWStoreToBuffer(bitmap_widget);
BWLeft(bitmap_widget);
BWChangeNotify(bitmap_widget);
BWSetChanged(bitmap_widget);
break;
-
+
case Right:
BWStoreToBuffer(bitmap_widget);
BWRight(bitmap_widget);
BWChangeNotify(bitmap_widget);
BWSetChanged(bitmap_widget);
break;
-
+
case Fold:
BWStoreToBuffer(bitmap_widget);
BWFold(bitmap_widget);
BWChangeNotify(bitmap_widget);
BWSetChanged(bitmap_widget);
break;
-
+
case FlipHoriz:
BWStoreToBuffer(bitmap_widget);
BWFlipHoriz(bitmap_widget);
BWChangeNotify(bitmap_widget);
BWSetChanged(bitmap_widget);
break;
-
+
case FlipVert:
BWStoreToBuffer(bitmap_widget);
BWFlipVert(bitmap_widget);
BWChangeNotify(bitmap_widget);
BWSetChanged(bitmap_widget);
break;
-
+
case RotateRight:
BWStoreToBuffer(bitmap_widget);
BWRotateRight(bitmap_widget);
BWChangeNotify(bitmap_widget);
BWSetChanged(bitmap_widget);
break;
-
+
case RotateLeft:
BWStoreToBuffer(bitmap_widget);
BWRotateLeft(bitmap_widget);
BWChangeNotify(bitmap_widget);
BWSetChanged(bitmap_widget);
break;
-
+
case Point:
BWRemoveAllRequests(bitmap_widget);
BWEngageRequest(bitmap_widget, PointRequest, True, Plain);
@@ -623,42 +622,42 @@ break;
BWRemoveAllRequests(bitmap_widget);
BWEngageRequest(bitmap_widget, CurveRequest, True, Plain);
break;
-
+
case Line:
BWRemoveAllRequests(bitmap_widget);
BWEngageRequest(bitmap_widget, LineRequest, True, Plain);
break;
-
+
case Rectangle:
BWRemoveAllRequests(bitmap_widget);
BWEngageRequest(bitmap_widget, RectangleRequest, True, Plain);
break;
-
+
case FilledRectangle:
BWRemoveAllRequests(bitmap_widget);
BWEngageRequest(bitmap_widget, FilledRectangleRequest, True, Plain);
break;
-
+
case Circle:
BWRemoveAllRequests(bitmap_widget);
BWEngageRequest(bitmap_widget, CircleRequest, True, Plain);
break;
-
+
case FilledCircle:
BWRemoveAllRequests(bitmap_widget);
BWEngageRequest(bitmap_widget, FilledCircleRequest, True, Plain);
break;
-
+
case FloodFill:
BWRemoveAllRequests(bitmap_widget);
BWEngageRequest(bitmap_widget, FloodFillRequest, True, Plain);
break;
-
+
case SetHotSpot:
BWRemoveAllRequests(bitmap_widget);
BWEngageRequest(bitmap_widget, HotSpotRequest, True, Plain);
break;
-
+
case ClearHotSpot:
BWStoreToBuffer(bitmap_widget);
BWClearHotSpot(bitmap_widget);
@@ -670,11 +669,11 @@ break;
BWUndo(bitmap_widget);
BWChangeNotify(bitmap_widget);
BWSetChanged(bitmap_widget);
- break;
+ break;
case Quit:
DoQuit(bitmap_widget, NULL, NULL, NULL);
- break;
+ break;
} /* don't add anything below this line */
}
@@ -690,17 +689,17 @@ void SwitchImage(void)
Position image_x, image_y;
int n;
Arg wargs[3];
-
+
XtTranslateCoords(bitmap_widget,
10, 10, &image_x, &image_y);
-
+
n = 0;
XtSetArg(wargs[n], XtNx, image_x); n++;
XtSetArg(wargs[n], XtNy, image_y); n++;
XtSetValues(image_shell, wargs, n);
-
+
image_visible = True;
-
+
FixImage();
XtPopup(image_shell, XtGrabNone);
FixImage();
@@ -724,7 +723,7 @@ void SwitchAxes(void)
void SwitchStippled(void)
{
- BWSwitchStippled(bitmap_widget);
+ BWSwitchStippled(bitmap_widget);
}
void SwitchProportional(void)
@@ -768,7 +767,7 @@ void DoCopy(void)
void DoPaste(void)
{
- BWRequestSelection(bitmap_widget, btime, TRUE);
+ BWRequestSelection(bitmap_widget, btime, TRUE);
BWEngageRequest(bitmap_widget, RestoreRequest, False, Plain);
}
@@ -799,13 +798,13 @@ void DoLoad(void)
case Yes:
if (BWWriteFile(bitmap_widget, filename, NULL)
!= BitmapSuccess) {
- XmuSnprintf(message, sizeof(message), "Can't write file: %s", filename);
+ snprintf(message, sizeof(message), "Can't write file: %s", filename);
if (PopupDialog(error_dialog, message,
NULL, NULL, XtGrabExclusive) == Retry)
goto RetryLoadSave;
}
break;
-
+
case Cancel:
return;
}
@@ -815,7 +814,7 @@ void DoLoad(void)
if (PopupDialog(input_dialog, "Load file:",
filename, &filename, XtGrabExclusive) == Okay) {
if (BWReadFile(bitmap_widget, filename, NULL) != BitmapSuccess) {
- XmuSnprintf(message, sizeof(message), "Can't read file: %s", filename);
+ snprintf(message, sizeof(message), "Can't read file: %s", filename);
if (PopupDialog(error_dialog, message,
NULL, NULL, XtGrabExclusive) == Retry)
goto RetryLoad;
@@ -835,7 +834,7 @@ void DoInsert(void)
if (PopupDialog(input_dialog, "Insert file:",
filename, &filename, XtGrabExclusive) == Okay) {
if (BWStoreFile(bitmap_widget, filename, NULL) != BitmapSuccess) {
- XmuSnprintf(message, sizeof(message), "Can't read file: %s", filename);
+ snprintf(message, sizeof(message), "Can't read file: %s", filename);
if (PopupDialog(error_dialog, message,
NULL, NULL, XtGrabExclusive) == Retry)
goto RetryInsert;
@@ -849,12 +848,12 @@ void DoInsert(void)
void DoSave(void)
{
BWGetFilename(bitmap_widget, &filename);
- if (!strcmp(filename, ""))
+ if (!strcmp(filename, ""))
DoSaveAs();
else if (BWWriteFile(bitmap_widget, NULL, NULL) != BitmapSuccess) {
- XmuSnprintf(message, sizeof(message), "Can't write file: %s", filename);
+ snprintf(message, sizeof(message), "Can't write file: %s", filename);
if (PopupDialog(error_dialog, message,
- NULL, NULL, XtGrabExclusive) == Retry)
+ NULL, NULL, XtGrabExclusive) == Retry)
DoSaveAs();
}
else {
@@ -869,7 +868,7 @@ void DoSaveAs(void)
if (PopupDialog(input_dialog, "Save file:",
filename, &filename, XtGrabExclusive) == Okay) {
if (BWWriteFile(bitmap_widget, filename, NULL) != BitmapSuccess) {
- XmuSnprintf(message, sizeof(message), "Can't write file: %s", filename);
+ snprintf(message, sizeof(message), "Can't write file: %s", filename);
if (PopupDialog(error_dialog, message,
NULL, NULL, XtGrabExclusive) == Retry)
goto RetrySave;
@@ -895,7 +894,7 @@ void DoResize(void)
FixStatus();
}
else {
- XmuSnprintf(message, sizeof(message), "Wrong format: %s", format);
+ snprintf(message, sizeof(message), "Wrong format: %s", format);
if (PopupDialog(error_dialog, message,
NULL, NULL, XtGrabExclusive) == Retry)
goto RetryResize;
@@ -918,7 +917,7 @@ void DoRescale(void)
FixStatus();
}
else {
- XmuSnprintf(message, sizeof(message), "Wrong format: %s", format);
+ snprintf(message, sizeof(message), "Wrong format: %s", format);
if (PopupDialog(error_dialog, message,
NULL, NULL, XtGrabExclusive) == Retry)
goto RetryRescale;
@@ -937,7 +936,7 @@ void DoFilename(void)
}
void DoBasename(void)
-{
+{
BWGetBasename(bitmap_widget, &base_name);
if (PopupDialog(input_dialog, "Change basename:",
base_name, &base_name, XtGrabExclusive) == Okay) {
@@ -954,16 +953,16 @@ void DoQuit(Widget w, XEvent *event, String *params, Cardinal *num_params)
switch (PopupDialog(qsave_dialog, "Save file before quitting?",
filename, &filename, XtGrabExclusive)) {
case Yes:
- if (BWWriteFile(bitmap_widget, filename, NULL)
+ if (BWWriteFile(bitmap_widget, filename, NULL)
!= BitmapSuccess) {
- XmuSnprintf(message, sizeof(message), "Can't write file: %s", filename);
- if (PopupDialog(error_dialog, message,
- NULL, NULL, XtGrabExclusive) == Retry)
+ snprintf(message, sizeof(message), "Can't write file: %s", filename);
+ if (PopupDialog(error_dialog, message,
+ NULL, NULL, XtGrabExclusive) == Retry)
goto RetryQuit;
else return;
}
break;
-
+
case Cancel:
return;
}
@@ -976,21 +975,21 @@ int main(int argc, char *argv[])
int i, n;
Arg wargs[2];
Widget w;
- Widget radio_group = NULL;
+ Widget radio_group = NULL;
XtPointer radio_data = NULL;
-
- top_widget = XtInitialize(NULL, "Bitmap",
+
+ top_widget = XtInitialize(NULL, "Bitmap",
options, XtNumber(options), &argc, argv);
if (argc > 2) {
- fprintf(stderr, usage);
+ fputs(usage, stderr);
exit (0);
}
check_mark = XCreateBitmapFromData(XtDisplay(top_widget),
RootWindowOfScreen(XtScreen(top_widget)),
- (char *) xlogo16_bits,
- xlogo16_width,
+ (char *) xlogo16_bits,
+ xlogo16_width,
xlogo16_height);
XtAddActions(actions_table, XtNumber(actions_table));
@@ -1004,45 +1003,45 @@ int main(int argc, char *argv[])
formy_widget = XtCreateManagedWidget("formy", formWidgetClass,
parent_widget, NULL, 0);
- fileMenu_widget = XtCreatePopupShell("fileMenu",
- simpleMenuWidgetClass,
+ fileMenu_widget = XtCreatePopupShell("fileMenu",
+ simpleMenuWidgetClass,
formy_widget, NULL, 0);
-
+
(void) XtCreateManagedWidget("fileButton",
- menuButtonWidgetClass,
+ menuButtonWidgetClass,
formy_widget, NULL, 0);
for (i = 0; i < XtNumber(file_menu); i++) {
- w = XtCreateManagedWidget(file_menu[i].name,
- (file_menu[i].trap ?
+ w = XtCreateManagedWidget(file_menu[i].name,
+ (file_menu[i].trap ?
smeBSBObjectClass : smeLineObjectClass),
fileMenu_widget, NULL, 0),
XtAddCallback(w,
XtNcallback,
TheCallback,
(XtPointer)&file_menu[i].id);
-
+
file_menu[i].widget = w;
}
-
- editMenu_widget = XtCreatePopupShell("editMenu",
- simpleMenuWidgetClass,
+
+ editMenu_widget = XtCreatePopupShell("editMenu",
+ simpleMenuWidgetClass,
formy_widget, NULL, 0);
-
- (void) XtCreateManagedWidget("editButton",
- menuButtonWidgetClass,
+
+ (void) XtCreateManagedWidget("editButton",
+ menuButtonWidgetClass,
formy_widget, NULL, 0);
for (i = 0; i < XtNumber(edit_menu); i++) {
- w = XtCreateManagedWidget(edit_menu[i].name,
- (edit_menu[i].trap ?
+ w = XtCreateManagedWidget(edit_menu[i].name,
+ (edit_menu[i].trap ?
smeBSBObjectClass : smeLineObjectClass),
editMenu_widget, NULL, 0),
XtAddCallback(w,
XtNcallback,
TheCallback,
(XtPointer)&edit_menu[i].id);
-
+
edit_menu[i].widget = w;
}
@@ -1052,12 +1051,12 @@ int main(int argc, char *argv[])
pane_widget = XtCreateManagedWidget("pane", panedWidgetClass,
parent_widget, NULL, 0);
- form_widget = XtCreateManagedWidget("form", formWidgetClass,
+ form_widget = XtCreateManagedWidget("form", formWidgetClass,
pane_widget, NULL, 0);
-
+
for (i = 0; i < XtNumber(buttons); i++) {
- w = XtCreateManagedWidget(buttons[i].name,
- (buttons[i].trap ?
+ w = XtCreateManagedWidget(buttons[i].name,
+ (buttons[i].trap ?
toggleWidgetClass : commandWidgetClass),
form_widget, NULL, 0);
@@ -1077,33 +1076,33 @@ int main(int argc, char *argv[])
pane_widget, NULL, 0);
XtRealizeWidget(top_widget);
if (argc > 1)
- if (BWReadFile(bitmap_widget, argv[1], NULL))
+ if (BWReadFile(bitmap_widget, argv[1], NULL))
wm_delete_window = XInternAtom(XtDisplay(top_widget), "WM_DELETE_WINDOW",
False);
(void) XSetWMProtocols (XtDisplay(top_widget), XtWindow(top_widget),
&wm_delete_window, 1);
-
+
image_shell = XtCreatePopupShell("image", transientShellWidgetClass,
top_widget, NULL, 0);
box_widget = XtCreateManagedWidget("box", boxWidgetClass,
image_shell, NULL, 0);
- normal_image_widget = XtCreateManagedWidget("normalImage",
+ normal_image_widget = XtCreateManagedWidget("normalImage",
labelWidgetClass,
box_widget, NULL, 0);
- inverted_image_widget = XtCreateManagedWidget("invertedImage",
+ inverted_image_widget = XtCreateManagedWidget("invertedImage",
labelWidgetClass,
box_widget, NULL, 0);
-
+
n=0;
XtSetArg(wargs[n], XtNbitmap, BWGetUnzoomedPixmap(bitmap_widget)); n++;
XtSetValues(normal_image_widget, wargs, n);
XtSetValues(inverted_image_widget, wargs, n);
-
+
XtRealizeWidget(image_shell);
BWNotify(bitmap_widget, (XtActionProc)FixUp);
@@ -1111,7 +1110,7 @@ int main(int argc, char *argv[])
FixStatus();
input_dialog = CreateDialog(top_widget, "input", Okay | Cancel);
- error_dialog = CreateDialog(top_widget, "error", Abort | Retry);
+ error_dialog = CreateDialog(top_widget, "error", Abort | Retry);
qsave_dialog = CreateDialog(top_widget, "qsave", Yes | No | Cancel);
XawToggleSetCurrent(radio_group, radio_data);
diff --git a/app/bitmap/Bitmap.c b/app/bitmap/Bitmap.c
index c2fc30efb..8171befad 100644
--- a/app/bitmap/Bitmap.c
+++ b/app/bitmap/Bitmap.c
@@ -35,13 +35,12 @@ from The Open Group.
#include <X11/Xaw/XawInit.h>
#include <X11/Xmu/CharSet.h>
#include <X11/Xmu/Drawing.h>
-#include <X11/Xmu/SysUtil.h>
#include <X11/Xatom.h>
#include <X11/Xfuncs.h>
#include <X11/Xos.h>
#include "BitmapP.h"
#include "Bitmap.h"
-
+
#include <stdio.h>
#include <math.h>
@@ -235,7 +234,7 @@ static Atom targets[] = {
#include "Requests.h"
-static BWRequestRec requests[] =
+static BWRequestRec requests[] =
{
{MarkRequest, sizeof(BWStatus),
TwoPointsEngage, (XtPointer) BWDrawRectangle,
@@ -269,24 +268,24 @@ static BWRequestRec requests[] =
DragTwoPointsEngage, (XtPointer) BWBlindLine,
DragTwoPointsTerminate, (XtPointer) BWBlindLine,
NULL, (XtPointer) NULL},
-{LineRequest, sizeof(BWStatus),
- TwoPointsEngage, (XtPointer) BWDrawLine,
+{LineRequest, sizeof(BWStatus),
+ TwoPointsEngage, (XtPointer) BWDrawLine,
TwoPointsTerminate, (XtPointer) BWDrawLine,
NULL, (XtPointer) NULL},
-{RectangleRequest, sizeof(BWStatus),
+{RectangleRequest, sizeof(BWStatus),
TwoPointsEngage, (XtPointer) BWDrawRectangle,
TwoPointsTerminate, (XtPointer) BWDrawRectangle,
NULL, (XtPointer) NULL},
-{FilledRectangleRequest, sizeof(BWStatus),
+{FilledRectangleRequest, sizeof(BWStatus),
TwoPointsEngage, (XtPointer) BWDrawRectangle,
TwoPointsTerminate, (XtPointer) BWDrawFilledRectangle,
NULL, (XtPointer) NULL},
-{CircleRequest, sizeof(BWStatus),
+{CircleRequest, sizeof(BWStatus),
TwoPointsEngage, (XtPointer) BWDrawCircle,
TwoPointsTerminate, (XtPointer) BWDrawCircle,
NULL, (XtPointer) NULL},
-{FilledCircleRequest, sizeof(BWStatus),
- TwoPointsEngage, (XtPointer) BWDrawCircle,
+{FilledCircleRequest, sizeof(BWStatus),
+ TwoPointsEngage, (XtPointer) BWDrawCircle,
TwoPointsTerminate, (XtPointer) BWDrawFilledCircle,
NULL, (XtPointer) NULL},
{FloodFillRequest, sizeof(BWStatus),
@@ -304,16 +303,16 @@ static BWRequestRec requests[] =
};
static void ClassInitialize(void);
-static void Initialize(Widget wrequest, Widget wnew,
+static void Initialize(Widget wrequest, Widget wnew,
ArgList argv, Cardinal *argc);
static void Redisplay(Widget w, XEvent *event, Region region);
static void Resize(Widget w);
static void Destroy(Widget w);
-static void Refresh(BitmapWidget BW, Position x, Position y,
+static void Refresh(BitmapWidget BW, Position x, Position y,
Dimension width, Dimension height);
static Boolean SetValues(Widget old, Widget request, Widget new,
ArgList args, Cardinal *num_args);
-
+
BitmapClassRec bitmapClassRec = {
{ /* core fields */
/* superclass */ (WidgetClass) &simpleClassRec,
@@ -349,7 +348,7 @@ BitmapClassRec bitmapClassRec = {
/* display_accelerator */ XtInheritDisplayAccelerator,
/* extension */ NULL,
},
- {
+ {
/* empty */ XtInheritChangeSensitive,
},
{
@@ -359,65 +358,65 @@ BitmapClassRec bitmapClassRec = {
/* num_requests */ XtNumber(requests),
}
};
-
+
WidgetClass bitmapWidgetClass = (WidgetClass) &bitmapClassRec;
-
+
/* ARGSUSED */
-void
+void
BWDebug(Widget w, XEvent *event, String *params, Cardinal *num_params)
{
DEBUG ^= True;
}
-Pixmap
-BWGetPixmap(Widget w)
+Pixmap
+BWGetPixmap(Widget w)
{
BitmapWidget BW = (BitmapWidget) w;
-
+
return GetPixmap(BW, BW->bitmap.zoom.image);
}
-Pixmap
+Pixmap
BWGetUnzoomedPixmap(Widget w)
{
BitmapWidget BW = (BitmapWidget) w;
GC gc;
Pixmap pix;
-
- if (BW->bitmap.zooming) {
- pix = XCreatePixmap(XtDisplay(w), XtWindow(w),
- BW->bitmap.zoom.image->width,
+
+ if (BW->bitmap.zooming) {
+ pix = XCreatePixmap(XtDisplay(w), XtWindow(w),
+ BW->bitmap.zoom.image->width,
BW->bitmap.zoom.image->height, 1);
- if (!(gc = XCreateGC(XtDisplay(w), pix,
+ if (!(gc = XCreateGC(XtDisplay(w), pix,
(unsigned long) 0, (XGCValues *) 0)))
return (Pixmap) None;
-
- XPutImage(XtDisplay(w), pix, gc,
- BW->bitmap.zoom.image,
- 0, 0, 0, 0,
- BW->bitmap.zoom.image->width,
+
+ XPutImage(XtDisplay(w), pix, gc,
+ BW->bitmap.zoom.image,
+ 0, 0, 0, 0,
+ BW->bitmap.zoom.image->width,
BW->bitmap.zoom.image->height);
- XPutImage(XtDisplay(w), pix, gc,
- BW->bitmap.image,
- 0, 0,
+ XPutImage(XtDisplay(w), pix, gc,
+ BW->bitmap.image,
+ 0, 0,
BW->bitmap.zoom.at_x,
BW->bitmap.zoom.at_y,
- BW->bitmap.image->width,
+ BW->bitmap.image->width,
BW->bitmap.image->height);
}
else {
- pix = XCreatePixmap(XtDisplay(w), XtWindow(w),
- BW->bitmap.image->width,
+ pix = XCreatePixmap(XtDisplay(w), XtWindow(w),
+ BW->bitmap.image->width,
BW->bitmap.image->height, 1);
- if (! (gc = XCreateGC(XtDisplay(w), pix,
+ if (! (gc = XCreateGC(XtDisplay(w), pix,
(unsigned long) 0, (XGCValues *) 0)))
return (Pixmap) None;
-
- XPutImage(XtDisplay(w), pix, gc,
- BW->bitmap.image,
+
+ XPutImage(XtDisplay(w), pix, gc,
+ BW->bitmap.image,
0, 0, 0, 0,
- BW->bitmap.image->width,
+ BW->bitmap.image->width,
BW->bitmap.image->height);
}
XFreeGC(XtDisplay(w), gc);
@@ -445,13 +444,13 @@ GetImage(BitmapWidget BW, Pixmap pixmap)
}
XImage *
-CreateBitmapImage(BitmapWidget BW, char *data,
+CreateBitmapImage(BitmapWidget BW, char *data,
Dimension width, Dimension height)
{
XImage *image = XCreateImage(XtDisplay(BW),
- DefaultVisual(XtDisplay(BW),
+ DefaultVisual(XtDisplay(BW),
DefaultScreen(XtDisplay(BW))),
- 1, XYBitmap, 0,
+ 1, XYBitmap, 0,
data, width, height,
8, ((int)width + 7) / 8);
@@ -470,7 +469,7 @@ CreateBitmapImage(BitmapWidget BW, char *data,
return image;
}
-void
+void
DestroyBitmapImage(XImage **image)
{
/*XDestroyImage(*image);*/
@@ -494,7 +493,7 @@ BWGetImage(Widget w, XEvent *event, String *params, Cardinal *num_params)
}
#endif
-void
+void
BWChangeNotify(Widget w)
{
BitmapWidget BW = (BitmapWidget) w;
@@ -503,7 +502,7 @@ BWChangeNotify(Widget w)
(*BW->bitmap.notify)(w, NULL, NULL, NULL);
}
-void
+void
BWNotify(Widget w, XtActionProc proc)
{
BitmapWidget BW = (BitmapWidget) w;
@@ -511,39 +510,39 @@ BWNotify(Widget w, XtActionProc proc)
BW->bitmap.notify = proc;
}
-void
+void
BWSetChanged(Widget w)
{
BitmapWidget BW = (BitmapWidget) w;
-
+
BW->bitmap.changed = True;
}
-Boolean
+Boolean
BWQueryChanged(Widget w)
{
BitmapWidget BW = (BitmapWidget) w;
-
+
return BW->bitmap.changed;
}
-void
+void
BWClearChanged(Widget w)
{
BitmapWidget BW = (BitmapWidget) w;
-
+
BW->bitmap.changed = False;
}
-Boolean
+Boolean
BWQueryStored(Widget w)
{
BitmapWidget BW = (BitmapWidget) w;
-
+
return (BW->bitmap.storage != NULL);
}
-Boolean
+Boolean
BWQueryStippled(Widget w)
{
BitmapWidget BW = (BitmapWidget) w;
@@ -551,11 +550,11 @@ BWQueryStippled(Widget w)
return BW->bitmap.stippled;
}
-static void
+static void
RedrawStippled(BitmapWidget BW)
{
XExposeEvent event;
-
+
event.type = Expose;
event.display = XtDisplay((Widget)BW);
event.window = XtWindow((Widget)BW);
@@ -564,17 +563,17 @@ RedrawStippled(BitmapWidget BW)
event.width = BW->core.width;
event.height = BW->core.height;
event.count = 0;
-
+
BWRedrawMark((Widget)BW);
-
- BW->bitmap.stipple_change_expose_event = True;
-
+
+ BW->bitmap.stipple_change_expose_event = True;
+
XtDispatchEvent((XEvent *)&event);
-
+
BW->bitmap.stipple_change_expose_event = False;
}
-void
+void
BWSwitchStippled(Widget w)
{
BitmapWidget BW = (BitmapWidget) w;
@@ -585,11 +584,11 @@ BWSwitchStippled(Widget w)
XSetFillStyle(XtDisplay(BW), BW->bitmap.highlighting_gc,
(BW->bitmap.stippled ? FillStippled : FillSolid));
- RedrawStippled(BW);
+ RedrawStippled(BW);
}
-void
-BWSelect(Widget w, Position from_x, Position from_y,
+void
+BWSelect(Widget w, Position from_x, Position from_y,
Position to_x, Position to_y, Time btime)
{
BWMark(w, from_x, from_y, to_x, to_y);
@@ -597,7 +596,7 @@ BWSelect(Widget w, Position from_x, Position from_y,
BWGrabSelection(w, btime);
}
-Boolean
+Boolean
BWQueryAxes(Widget w)
{
BitmapWidget BW = (BitmapWidget) w;
@@ -605,7 +604,7 @@ BWQueryAxes(Widget w)
return BW->bitmap.axes;
}
-void
+void
BWSwitchAxes(Widget w)
{
BitmapWidget BW = (BitmapWidget) w;
@@ -614,27 +613,27 @@ BWSwitchAxes(Widget w)
BWHighlightAxes(w);
}
-void
+void
BWAxes(Widget w, Boolean _switch)
{
BitmapWidget BW = (BitmapWidget) w;
-
+
if (BW->bitmap.axes != _switch)
BWSwitchAxes(w);
}
-void
+void
BWRedrawAxes(Widget w)
{
BitmapWidget BW = (BitmapWidget) w;
-
+
if (BW->bitmap.axes)
BWHighlightAxes(w);
}
#if 0
-void
-BWPutImage(BitmapWidget w, Display *display, Drawable drawable, GC gc,
+void
+BWPutImage(BitmapWidget w, Display *display, Drawable drawable, GC gc,
Position x, Position y)
{
BitmapWidget BW = (BitmapWidget) w;
@@ -644,13 +643,14 @@ BWPutImage(BitmapWidget w, Display *display, Drawable drawable, GC gc,
}
#endif
-static String
-StripFilename(String filename)
+static String
+StripFilename(_Xconst _XtString filename)
{
- char *begin = strrchr(filename, '/');
- char *end, *result;
+ const char *begin = strrchr(filename, '/');
+ const char *end;
+ char *result;
int length;
-
+
if (filename) {
begin = (begin ? begin + 1 : filename);
end = strchr(begin, '.'); /* change to strrchr to allow longer names */
@@ -664,26 +664,27 @@ StripFilename(String filename)
return (NULL);
}
-static int
-XmuWriteBitmapDataToFile(String filename, String basename,
- int width, int height, char *datap,
+static int
+XmuWriteBitmapDataToFile(_Xconst _XtString filename,
+ _Xconst _XtString basename,
+ int width, int height, char *datap,
int x_hot, int y_hot)
{
FILE *file;
int i, data_length;
-
+
data_length = Length(width, height);
-
- if(!filename || !strcmp(filename, "") || !strcmp(filename, "-")) {
+
+ if(!filename || !strcmp(filename, "") || !strcmp(filename, "-")) {
file = stdout;
filename = "dummy";
}
else
file = fopen(filename, "w+");
-
+
if (!basename || !strcmp(basename, "") || !strcmp(basename, "-"))
basename = StripFilename(filename);
-
+
if (file) {
fprintf(file, "#define %s_width %d\n", basename, width);
fprintf(file, "#define %s_height %d\n", basename, height);
@@ -699,13 +700,13 @@ XmuWriteBitmapDataToFile(String filename, String basename,
fprintf(file, "0x%02x", (unsigned char) datap[i]);
}
fprintf(file, "};\n");
-
+
if (file != stdout)
fclose(file);
return BitmapSuccess;
}
-
+
return 1;
}
@@ -714,24 +715,24 @@ XmuWriteBitmapDataToFile(String filename, String basename,
*/
/* ARGSUSED */
-static void
+static void
CvtStringToButtonFunction(XrmValuePtr args, /* not used */
Cardinal *num_args, /* not used */
- XrmValuePtr from_val,
+ XrmValuePtr from_val,
XrmValuePtr to_val)
{
static int button_function;
char lower_name[80];
-
+
XmuCopyISOLatin1Lowered (lower_name, (char*)from_val->addr);
-
+
if (!strcmp(lower_name, XtClear)) {
button_function = Clear;
to_val->addr = (XPointer) &button_function;
to_val->size = sizeof(button_function);
return;
}
-
+
if (!strcmp(lower_name, XtSet)) {
button_function = Set;
to_val->addr = (XPointer) &button_function;
@@ -745,15 +746,15 @@ CvtStringToButtonFunction(XrmValuePtr args, /* not used */
to_val->size = sizeof(button_function);
return;
}
-
+
XtStringConversionWarning(from_val->addr, XtRButtonFunction);
button_function = Clear;
to_val->addr = (XPointer) &button_function;
to_val->size = sizeof(button_function);
-
+
}
-static void
+static void
ClassInitialize(void)
{
char *tm_table = XtMalloc(strlen(translations1) + strlen(translations2) + 1);
@@ -767,10 +768,10 @@ ClassInitialize(void)
DEBUG = False;
}
-static void
+static void
SetSizeFromSizeResource(BitmapWidget bw)
{
- if (BWParseSize(bw->bitmap.size,
+ if (BWParseSize(bw->bitmap.size,
&bw->bitmap.width,
&bw->bitmap.height)
==
@@ -783,7 +784,7 @@ SetSizeFromSizeResource(BitmapWidget bw)
/* ARGSUSED */
-static void
+static void
Initialize(Widget wrequest, Widget wnew, ArgList argv, Cardinal *argc)
{
BitmapWidget new = (BitmapWidget) wnew;
@@ -811,14 +812,14 @@ Initialize(Widget wrequest, Widget wnew, ArgList argv, Cardinal *argc)
SetSizeFromSizeResource(new);
- new->core.width = new->bitmap.width * new->bitmap.squareW +
+ new->core.width = new->bitmap.width * new->bitmap.squareW +
2 * new->bitmap.margin;
- new->core.height = new->bitmap.height * new->bitmap.squareH +
+ new->core.height = new->bitmap.height * new->bitmap.squareH +
2 * new->bitmap.margin;
-
+
new->bitmap.hot.x = new->bitmap.hot.y = NotSet;
new->bitmap.buffer_hot.x = new->bitmap.buffer_hot.y = NotSet;
-
+
new->bitmap.mark.from_x = new->bitmap.mark.from_y = NotSet;
new->bitmap.mark.to_x = new->bitmap.mark.to_y = NotSet;
new->bitmap.buffer_mark.from_x = new->bitmap.buffer_mark.from_y = NotSet;
@@ -829,8 +830,8 @@ Initialize(Widget wrequest, Widget wnew, ArgList argv, Cardinal *argc)
values.foreground ^= values.background;
values.function = GXxor;
mask = GCForeground | GCBackground | GCFunction;
- new->bitmap.drawing_gc = XCreateGC(XtDisplay(new),
- RootWindow(XtDisplay(new),
+ new->bitmap.drawing_gc = XCreateGC(XtDisplay(new),
+ RootWindow(XtDisplay(new),
DefaultScreen(XtDisplay(new))),
mask, &values);
@@ -846,9 +847,9 @@ Initialize(Widget wrequest, Widget wnew, ArgList argv, Cardinal *argc)
}
values.fill_style = (new->bitmap.stippled ? FillStippled : FillSolid);
- new->bitmap.highlighting_gc = XCreateGC(XtDisplay(new),
- RootWindow(XtDisplay(new),
- DefaultScreen(XtDisplay(new))),
+ new->bitmap.highlighting_gc = XCreateGC(XtDisplay(new),
+ RootWindow(XtDisplay(new),
+ DefaultScreen(XtDisplay(new))),
mask, &values);
@@ -863,8 +864,8 @@ Initialize(Widget wrequest, Widget wnew, ArgList argv, Cardinal *argc)
}
values.fill_style = (new->bitmap.dashed ? FillStippled : FillSolid);
- new->bitmap.frame_gc = XCreateGC(XtDisplay(new),
- RootWindow(XtDisplay(new),
+ new->bitmap.frame_gc = XCreateGC(XtDisplay(new),
+ RootWindow(XtDisplay(new),
DefaultScreen(XtDisplay(new))),
mask, &values);
@@ -872,23 +873,23 @@ Initialize(Widget wrequest, Widget wnew, ArgList argv, Cardinal *argc)
values.background = new->core.background_pixel;
values.foreground ^= values.background;
mask = GCForeground | GCBackground | GCFunction;
- new->bitmap.axes_gc = XCreateGC(XtDisplay(new),
- RootWindow(XtDisplay(new),
+ new->bitmap.axes_gc = XCreateGC(XtDisplay(new),
+ RootWindow(XtDisplay(new),
DefaultScreen(XtDisplay(new))),
mask, &values);
- image_data = CreateCleanData(Length(new->bitmap.width,
+ image_data = CreateCleanData(Length(new->bitmap.width,
new->bitmap.height));
- buffer_data = CreateCleanData(Length(new->bitmap.width,
+ buffer_data = CreateCleanData(Length(new->bitmap.width,
new->bitmap.height));
new->bitmap.storage = NULL;
-
- new->bitmap.image = CreateBitmapImage(new,
+
+ new->bitmap.image = CreateBitmapImage(new,
image_data,
new->bitmap.width,
new->bitmap.height);
- new->bitmap.buffer = CreateBitmapImage(new,
+ new->bitmap.buffer = CreateBitmapImage(new,
buffer_data,
new->bitmap.width,
new->bitmap.height);
@@ -901,36 +902,36 @@ Initialize(Widget wrequest, Widget wnew, ArgList argv, Cardinal *argc)
char *buffer_data;
unsigned int width, height;
int x_hot, y_hot;
-
- status = XmuReadBitmapDataFromFile(new->bitmap.filename,
+
+ status = XmuReadBitmapDataFromFile(new->bitmap.filename,
&width, &height, &image_data,
&x_hot, &y_hot);
if (status == BitmapSuccess) {
-
+
buffer_data = CreateCleanData(Length(width, height));
-
+
image = CreateBitmapImage(new, (char *)image_data, width, height);
buffer = CreateBitmapImage(new, buffer_data, width, height);
-
+
TransferImageData(new->bitmap.image, buffer);
-
+
DestroyBitmapImage(&new->bitmap.image);
DestroyBitmapImage(&new->bitmap.buffer);
-
+
new->bitmap.image = image;
new->bitmap.buffer = buffer;
new->bitmap.width = width;
new->bitmap.height = height;
-
+
new->bitmap.hot.x = x_hot;
new->bitmap.hot.y = y_hot;
-
+
new->bitmap.changed = False;
new->bitmap.zooming = False;
}
new->bitmap.filename = XtNewString(new->bitmap.filename);
-
+
if (!strcmp(new->bitmap.basename, "")) {
new->bitmap.basename = StripFilename(new->bitmap.filename);
}
@@ -943,7 +944,7 @@ Initialize(Widget wrequest, Widget wnew, ArgList argv, Cardinal *argc)
/* returns False if the format is wrong */
-Boolean
+Boolean
BWParseSize(String size, Dimension *width, Dimension *height)
{
int x, y;
@@ -962,7 +963,7 @@ BWParseSize(String size, Dimension *width, Dimension *height)
}
-Boolean
+Boolean
BWQueryMarked(Widget w)
{
BitmapWidget BW = (BitmapWidget) w;
@@ -970,60 +971,60 @@ BWQueryMarked(Widget w)
return QuerySet(BW->bitmap.mark.from_x, BW->bitmap.mark.from_y);
}
-static void
+static void
FixMark(BitmapWidget BW)
{
if (QuerySet(BW->bitmap.mark.from_x, BW->bitmap.mark.from_y)) {
- BW->bitmap.mark.from_x = min(BW->bitmap.mark.from_x,
+ BW->bitmap.mark.from_x = min(BW->bitmap.mark.from_x,
BW->bitmap.image->width);
- BW->bitmap.mark.from_y = min(BW->bitmap.mark.from_y,
+ BW->bitmap.mark.from_y = min(BW->bitmap.mark.from_y,
BW->bitmap.image->height);
- BW->bitmap.mark.to_x = min(BW->bitmap.mark.to_x,
+ BW->bitmap.mark.to_x = min(BW->bitmap.mark.to_x,
BW->bitmap.image->width);
- BW->bitmap.mark.to_y = min(BW->bitmap.mark.to_y,
+ BW->bitmap.mark.to_y = min(BW->bitmap.mark.to_y,
BW->bitmap.image->height);
-
+
if((BW->bitmap.mark.from_x == BW->bitmap.mark.from_y) &&
(BW->bitmap.mark.to_x == BW->bitmap.mark.to_y))
- BW->bitmap.mark.from_x =
+ BW->bitmap.mark.from_x =
BW->bitmap.mark.from_y =
- BW->bitmap.mark.to_x =
+ BW->bitmap.mark.to_x =
BW->bitmap.mark.to_y = NotSet;
}
}
/* ARGSUSED */
-int
-BWStoreFile(Widget w, String filename, String *basename)
+int
+BWStoreFile(Widget w, _Xconst _XtString filename, _Xconst _XtString *basename)
{
BitmapWidget BW = (BitmapWidget) w;
int status;
unsigned char *storage_data;
unsigned int width, height;
int x_hot, y_hot;
-
+
status = XmuReadBitmapDataFromFile(filename, &width, &height,
&storage_data, &x_hot, &y_hot);
if (status == BitmapSuccess) {
DestroyBitmapImage(&BW->bitmap.storage);
-
+
BW->bitmap.storage = CreateBitmapImage(BW, (char *)storage_data, width, height);
return BitmapSuccess;
}
else
XtWarning(" read file failed. BitmapWidget");
-
+
return status;
}
-String
+String
BWUnparseStatus(Widget w)
{
BitmapWidget BW = (BitmapWidget) w;
-
- XmuSnprintf(BW->bitmap.status, sizeof(BW->bitmap.status),
+
+ snprintf(BW->bitmap.status, sizeof(BW->bitmap.status),
"Filename: %s Basename: %s Size: %dx%d",
(strcmp(BW->bitmap.filename, "") ? BW->bitmap.filename : "<none>"),
(strcmp(BW->bitmap.basename, "") ? BW->bitmap.basename : "<none>"),
@@ -1032,22 +1033,22 @@ BWUnparseStatus(Widget w)
return BW->bitmap.status;
}
-void
-BWChangeFilename(Widget w, String str)
+void
+BWChangeFilename(Widget w, _Xconst _XtString str)
{
BitmapWidget BW = (BitmapWidget) w;
-
+
if (str) {
XtFree(BW->bitmap.filename);
BW->bitmap.filename = XtNewString( str);
}
}
-void
-BWChangeBasename(Widget w, String str)
+void
+BWChangeBasename(Widget w, _Xconst _XtString str)
{
BitmapWidget BW = (BitmapWidget) w;
-
+
if (str) {
XtFree(BW->bitmap.basename);
BW->bitmap.basename = XtNewString(str);
@@ -1055,8 +1056,8 @@ BWChangeBasename(Widget w, String str)
}
-int
-BWReadFile(Widget w, String filename, String basename) /* ARGSUSED */
+int
+BWReadFile(Widget w, _Xconst _XtString filename, _Xconst _XtString basename) /* ARGSUSED */
{
BitmapWidget BW = (BitmapWidget) w;
int status;
@@ -1065,117 +1066,117 @@ BWReadFile(Widget w, String filename, String basename) /* ARGSUSED */
char *buffer_data;
unsigned int width, height;
int x_hot, y_hot;
-
+
if (!filename)
filename = BW->bitmap.filename;
status = XmuReadBitmapDataFromFile(filename, &width, &height, &image_data,
&x_hot, &y_hot);
if (status == BitmapSuccess) {
-
+
buffer_data = CreateCleanData(Length(width, height));
-
+
image = CreateBitmapImage(BW, (char *)image_data, width, height);
buffer = CreateBitmapImage(BW, buffer_data, width, height);
-
+
TransferImageData(BW->bitmap.image, buffer);
-
+
DestroyBitmapImage(&BW->bitmap.image);
DestroyBitmapImage(&BW->bitmap.buffer);
-
+
BW->bitmap.image = image;
BW->bitmap.buffer = buffer;
BW->bitmap.width = width;
BW->bitmap.height = height;
-
+
BW->bitmap.hot.x = x_hot;
BW->bitmap.hot.y = y_hot;
-
+
BW->bitmap.changed = False;
BW->bitmap.zooming = False;
-
+
XtFree(BW->bitmap.filename);
BW->bitmap.filename = XtNewString(filename);
XtFree(BW->bitmap.basename);
BW->bitmap.basename= XtNewString(StripFilename(filename));
BWUnmark(w);
-
+
Resize((Widget)BW);
if (BW->core.visible) {
XClearArea(XtDisplay(BW), XtWindow(BW),
- 0, 0,
+ 0, 0,
BW->core.width, BW->core.height,
True);
}
-
+
return BitmapSuccess;
}
else
XtWarning(" read file failed. BitmapWidget");
-
+
return status;
}
#if 0
-void
+void
BWSetImage(Widget w, XImage *image)
{
BitmapWidget BW = (BitmapWidget) w;
XImage *buffer;
char *buffer_data;
-
+
buffer_data = CreateCleanData(Length(image->width, image->height));
- buffer = CreateBitmapImage(BW, buffer_data,
- (Dimension) image->width,
+ buffer = CreateBitmapImage(BW, buffer_data,
+ (Dimension) image->width,
(Dimension) image->height);
-
+
TransferImageData(BW->bitmap.image, buffer);
-
+
DestroyBitmapImage(&BW->bitmap.image);
DestroyBitmapImage(&BW->bitmap.buffer);
-
+
BW->bitmap.image = image;
BW->bitmap.buffer = buffer;
BW->bitmap.width = image->width;
BW->bitmap.height = image->height;
-
+
Resize((Widget)BW);
-
+
if (BW->core.visible) {
XClearArea(XtDisplay(BW), XtWindow(BW),
- 0, 0,
+ 0, 0,
BW->core.width, BW->core.height,
- True);
+ True);
}
}
#endif
-int
-BWWriteFile(Widget w, String filename, String basename)
+int
+BWWriteFile(Widget w, _Xconst _XtString filename, _Xconst _XtString basename)
{
BitmapWidget BW = (BitmapWidget) w;
char *data;
XImage *image;
XPoint hot;
int status;
-
+
if (BW->bitmap.zooming) {
- data = XtMalloc(Length(BW->bitmap.zoom.image->width,
+ data = XtMalloc(Length(BW->bitmap.zoom.image->width,
BW->bitmap.zoom.image->height));
- memmove( data, BW->bitmap.zoom.image->data,
- Length(BW->bitmap.zoom.image->width,
+ memmove( data, BW->bitmap.zoom.image->data,
+ Length(BW->bitmap.zoom.image->width,
BW->bitmap.zoom.image->height));
image = CreateBitmapImage(BW, data,
(Dimension) BW->bitmap.zoom.image->width,
(Dimension) BW->bitmap.zoom.image->height);
- CopyImageData(BW->bitmap.image, image,
- 0, 0,
+ CopyImageData(BW->bitmap.image, image,
+ 0, 0,
BW->bitmap.image->width - 1,
BW->bitmap.image->height - 1,
BW->bitmap.zoom.at_x, BW->bitmap.zoom.at_y);
-
+
if (QuerySet(BW->bitmap.hot.x, BW->bitmap.hot.y)) {
hot.x = BW->bitmap.hot.x + BW->bitmap.zoom.at_x;
hot.y = BW->bitmap.hot.y + BW->bitmap.zoom.at_y;
@@ -1187,7 +1188,7 @@ BWWriteFile(Widget w, String filename, String basename)
image = BW->bitmap.image;
hot = BW->bitmap.hot;
}
-
+
if (!filename) filename = BW->bitmap.filename;
else {
XtFree(BW->bitmap.filename);
@@ -1209,24 +1210,24 @@ BWWriteFile(Widget w, String filename, String basename)
hot.x, hot.y);
if (BW->bitmap.zooming)
DestroyBitmapImage(&image);
-
+
if (status == BitmapSuccess)
BW->bitmap.changed = False;
-
+
return status;
}
-String
+String
BWGetFilename(Widget w, String *str)
{
BitmapWidget BW = (BitmapWidget) w;
-
+
*str = XtNewString(BW->bitmap.filename);
return *str;
}
-String
+String
BWGetFilepath(Widget w, String *str)
{
BitmapWidget BW = (BitmapWidget) w;
@@ -1237,42 +1238,42 @@ BWGetFilepath(Widget w, String *str)
if (end)
*(end + 1) = '\0';
- else
+ else
**str = '\0';
return *str;
}
-String
+String
BWGetBasename(Widget w, String *str)
{
BitmapWidget BW = (BitmapWidget) w;
-
+
*str = XtNewString(BW->bitmap.basename);
return *str;
}
-static void
+static void
FixHotSpot(BitmapWidget BW)
{
if (!QueryInBitmap(BW, BW->bitmap.hot.x, BW->bitmap.hot.y))
BW->bitmap.hot.x = BW->bitmap.hot.y = NotSet;
}
-static void
+static void
ZoomOut(BitmapWidget BW)
{
- CopyImageData(BW->bitmap.image, BW->bitmap.zoom.image,
- 0, 0,
+ CopyImageData(BW->bitmap.image, BW->bitmap.zoom.image,
+ 0, 0,
BW->bitmap.image->width - 1,
BW->bitmap.image->height - 1,
BW->bitmap.zoom.at_x, BW->bitmap.zoom.at_y);
-
+
DestroyBitmapImage(&BW->bitmap.image);
DestroyBitmapImage(&BW->bitmap.buffer);
-
+
BW->bitmap.image = BW->bitmap.zoom.image;
BW->bitmap.buffer = BW->bitmap.zoom.buffer;
BW->bitmap.width = BW->bitmap.image->width;
@@ -1287,62 +1288,62 @@ ZoomOut(BitmapWidget BW)
}
else
BW->bitmap.hot = BW->bitmap.zoom.hot;
-
+
BW->bitmap.mark.from_x = NotSet;
BW->bitmap.mark.from_y = NotSet;
BW->bitmap.mark.to_x = NotSet;
BW->bitmap.mark.to_y = NotSet;
BW->bitmap.zooming = False;
-}
+}
-void
+void
BWZoomOut(Widget w)
{
BitmapWidget BW = (BitmapWidget) w;
-
+
if (BW->bitmap.zooming) {
ZoomOut(BW);
-
+
Resize((Widget)BW);
if (BW->core.visible)
XClearArea(XtDisplay(BW), XtWindow(BW),
- 0, 0,
+ 0, 0,
BW->core.width, BW->core.height,
True);
}
}
-void
+void
BWZoomMarked(Widget w)
{
BitmapWidget BW = (BitmapWidget) w;
- BWZoomIn(w,
+ BWZoomIn(w,
BW->bitmap.mark.from_x, BW->bitmap.mark.from_y,
BW->bitmap.mark.to_x, BW->bitmap.mark.to_y);
}
-void
-BWZoomIn(Widget w,
- Position from_x, Position from_y,
+void
+BWZoomIn(Widget w,
+ Position from_x, Position from_y,
Position to_x, Position to_y)
{
BitmapWidget BW = (BitmapWidget) w;
- XImage *image, *buffer;
+ XImage *image, *buffer;
Dimension width, height;
char *image_data, *buffer_data;
-
+
if (BW->bitmap.zooming)
ZoomOut(BW);
-
+
QuerySwap(from_x, to_x);
QuerySwap(from_y, to_y);
from_x = max(0, from_x);
from_y = max(0, from_y);
to_x = min(BW->bitmap.width - 1, to_x);
to_y = min(BW->bitmap.height - 1, to_y);
-
+
width = to_x - from_x + 1;
height = to_y - from_y + 1;
@@ -1354,7 +1355,7 @@ BWZoomIn(Widget w,
CopyImageData(BW->bitmap.image, image, from_x, from_y, to_x, to_y, 0, 0);
CopyImageData(BW->bitmap.buffer, buffer, from_x, from_y, to_x, to_y, 0, 0);
-
+
BW->bitmap.zoom.image = BW->bitmap.image;
BW->bitmap.zoom.buffer = BW->bitmap.buffer;
BW->bitmap.zoom.at_x = from_x;
@@ -1383,13 +1384,13 @@ BWZoomIn(Widget w,
Resize((Widget)BW);
if (BW->core.visible)
XClearArea(XtDisplay(BW), XtWindow(BW),
- 0, 0,
+ 0, 0,
BW->core.width, BW->core.height,
True);
}
-void
+void
BWRescale(Widget w, Dimension width, Dimension height)
{
BitmapWidget BW = (BitmapWidget) w;
@@ -1398,38 +1399,38 @@ BWRescale(Widget w, Dimension width, Dimension height)
if (BW->bitmap.zooming)
ZoomOut(BW);
-
- image = ScaleBitmapImage(BW, BW->bitmap.image,
+
+ image = ScaleBitmapImage(BW, BW->bitmap.image,
(double) width / (double) BW->bitmap.image->width,
(double) height / (double) BW->bitmap.image->height);
buffer_data = CreateCleanData(Length(image->width, image->height));
- buffer = CreateBitmapImage(BW, buffer_data,
- (Dimension) image->width,
+ buffer = CreateBitmapImage(BW, buffer_data,
+ (Dimension) image->width,
(Dimension) image->height);
-
+
TransferImageData(BW->bitmap.buffer, buffer);
DestroyBitmapImage(&BW->bitmap.image);
DestroyBitmapImage(&BW->bitmap.buffer);
-
+
BW->bitmap.image = image;
BW->bitmap.buffer = buffer;
BW->bitmap.width = image->width;
BW->bitmap.height = image->height;
-
+
FixHotSpot(BW);
FixMark(BW);
Resize((Widget)BW);
if (BW->core.visible)
XClearArea(XtDisplay(BW), XtWindow(BW),
- 0, 0,
+ 0, 0,
BW->core.width, BW->core.height,
True);
}
-Boolean
+Boolean
BWQueryZooming(Widget w)
{
BitmapWidget BW = (BitmapWidget) w;
@@ -1438,37 +1439,37 @@ BWQueryZooming(Widget w)
}
-static void
+static void
ResizeGrid(BitmapWidget BW, Dimension width, Dimension height)
{
XImage *image, *buffer;
char *image_data, *buffer_data;
-
+
if (BW->bitmap.zooming)
ZoomOut(BW);
-
+
image_data = CreateCleanData(Length(width, height));
buffer_data = CreateCleanData(Length(width, height));
-
+
image = CreateBitmapImage(BW, image_data, width, height);
buffer = CreateBitmapImage(BW, buffer_data, width, height);
-
+
TransferImageData(BW->bitmap.image, image);
TransferImageData(BW->bitmap.buffer, buffer);
-
+
DestroyBitmapImage(&BW->bitmap.image);
DestroyBitmapImage(&BW->bitmap.buffer);
-
+
BW->bitmap.image = image;
BW->bitmap.buffer = buffer;
BW->bitmap.width = width;
BW->bitmap.height = height;
-
+
FixHotSpot(BW);
FixMark(BW);
}
-void
+void
BWResize(Widget w, Dimension width, Dimension height)
{
BitmapWidget BW = (BitmapWidget) w;
@@ -1478,12 +1479,12 @@ BWResize(Widget w, Dimension width, Dimension height)
Resize((Widget)BW);
if (BW->core.visible)
XClearArea(XtDisplay(BW), XtWindow(BW),
- 0, 0,
+ 0, 0,
BW->core.width, BW->core.height,
True);
}
-static void
+static void
Destroy(Widget w)
{
BitmapWidget BW = (BitmapWidget) w;
@@ -1499,16 +1500,16 @@ Destroy(Widget w)
}
-static void
+static void
Resize(Widget w)
{
BitmapWidget BW = (BitmapWidget) w;
Dimension squareW, squareH;
- squareW = max(1, ((int)BW->core.width - 2 * (int)BW->bitmap.margin) /
+ squareW = max(1, ((int)BW->core.width - 2 * (int)BW->bitmap.margin) /
(int)BW->bitmap.width);
- squareH = max(1, ((int)BW->core.height - 2 * (int)BW->bitmap.margin) /
+ squareH = max(1, ((int)BW->core.height - 2 * (int)BW->bitmap.margin) /
(int)BW->bitmap.height);
if (BW->bitmap.proportional)
@@ -1517,22 +1518,22 @@ Resize(Widget w)
BW->bitmap.squareW = squareW;
BW->bitmap.squareH = squareH;
}
-
- BW->bitmap.horizOffset = max((Position)BW->bitmap.margin,
- (Position)(BW->core.width -
- BW->bitmap.width *
+
+ BW->bitmap.horizOffset = max((Position)BW->bitmap.margin,
+ (Position)(BW->core.width -
+ BW->bitmap.width *
BW->bitmap.squareW) / 2);
- BW->bitmap.vertOffset = max((Position)BW->bitmap.margin,
- (Position)(BW->core.height -
- BW->bitmap.height *
+ BW->bitmap.vertOffset = max((Position)BW->bitmap.margin,
+ (Position)(BW->core.height -
+ BW->bitmap.height *
BW->bitmap.squareH) / 2);
- BW->bitmap.grid &= ((BW->bitmap.squareW > BW->bitmap.grid_tolerance) &&
+ BW->bitmap.grid &= ((BW->bitmap.squareW > BW->bitmap.grid_tolerance) &&
(BW->bitmap.squareH > BW->bitmap.grid_tolerance));
}
/* ARGSUSED */
-static void
+static void
Redisplay(Widget w, XEvent *event, Region region)
{
BitmapWidget BW = (BitmapWidget) w;
@@ -1541,19 +1542,19 @@ Redisplay(Widget w, XEvent *event, Region region)
&&
BW->core.visible)
if (BW->bitmap.stipple_change_expose_event == False)
- Refresh(BW,
+ Refresh(BW,
event->xexpose.x, event->xexpose.y,
event->xexpose.width, event->xexpose.height);
}
-void
+void
BWClip(Widget w, Position x, Position y, Dimension width, Dimension height)
{
Position from_x, from_y,
to_x, to_y;
BitmapWidget BW = (BitmapWidget) w;
XRectangle rectangle;
-
+
from_x = InBitmapX(BW, x);
from_y = InBitmapY(BW, y);
to_x = InBitmapX(BW, x + width);
@@ -1591,12 +1592,12 @@ BWClip(Widget w, Position x, Position y, Dimension width, Dimension height)
Unsorted);
}
-void
+void
BWUnclip(Widget w)
{
BitmapWidget BW = (BitmapWidget) w;
XRectangle rectangle;
-
+
rectangle.x = InWindowX(BW, 0);
rectangle.y = InWindowY(BW, 0);
rectangle.width = InWindowX(BW, BW->bitmap.width) - InWindowX(BW, 0);
@@ -1623,8 +1624,8 @@ BWUnclip(Widget w)
Unsorted);
}
-static void
-Refresh(BitmapWidget BW, Position x, Position y,
+static void
+Refresh(BitmapWidget BW, Position x, Position y,
Dimension width, Dimension height)
{
XRectangle rectangle;
@@ -1635,7 +1636,7 @@ Refresh(BitmapWidget BW, Position x, Position y,
InWindowX(BW, InBitmapX(BW, x + width)+1)) - rectangle.x;
rectangle.height = max(y + height,
InWindowY(BW, InBitmapY(BW, y + height)+1)) - rectangle.y;
-
+
XClearArea(XtDisplay(BW), XtWindow(BW),
rectangle.x, rectangle.y,
rectangle.width, rectangle.height,
@@ -1650,7 +1651,7 @@ Refresh(BitmapWidget BW, Position x, Position y,
XDrawRectangle(XtDisplay(BW), XtWindow(BW),
BW->bitmap.frame_gc,
InWindowX(BW, 0) - 1, InWindowY(BW, 0) - 1,
- InWindowX(BW, BW->bitmap.width) - InWindowX(BW, 0) + 1,
+ InWindowX(BW, BW->bitmap.width) - InWindowX(BW, 0) + 1,
InWindowY(BW, BW->bitmap.height) - InWindowY(BW, 0) + 1);
BWClip((Widget) BW, x, y, width, height);
@@ -1665,7 +1666,7 @@ Refresh(BitmapWidget BW, Position x, Position y,
BWUnclip((Widget) BW);
}
-Boolean
+Boolean
BWQueryGrid(Widget w)
{
BitmapWidget BW = (BitmapWidget) w;
@@ -1673,7 +1674,7 @@ BWQueryGrid(Widget w)
return BW->bitmap.grid;
}
-void
+void
BWSwitchGrid(Widget w)
{
BitmapWidget BW = (BitmapWidget) w;
@@ -1683,16 +1684,16 @@ BWSwitchGrid(Widget w)
BW->bitmap.image->width - 1, BW->bitmap.image->height - 1);
}
-void
+void
BWGrid(Widget w, Boolean _switch)
{
BitmapWidget BW = (BitmapWidget) w;
-
+
if (BW->bitmap.grid != _switch)
BWSwitchGrid(w);
}
-Boolean
+Boolean
BWQueryDashed(Widget w)
{
BitmapWidget BW = (BitmapWidget) w;
@@ -1700,7 +1701,7 @@ BWQueryDashed(Widget w)
return (BW->bitmap.dashed);
}
-void
+void
BWSwitchDashed(Widget w)
{
BitmapWidget BW = (BitmapWidget) w;
@@ -1722,35 +1723,35 @@ BWSwitchDashed(Widget w)
XDrawRectangle(XtDisplay(BW), XtWindow(BW),
BW->bitmap.frame_gc,
InWindowX(BW, 0) - 1, InWindowY(BW, 0) - 1,
- InWindowX(BW, BW->bitmap.width) - InWindowX(BW, 0) + 1,
+ InWindowX(BW, BW->bitmap.width) - InWindowX(BW, 0) + 1,
InWindowY(BW, BW->bitmap.height) - InWindowY(BW, 0) + 1);
-
+
BW->bitmap.dashed ^= True;
XSetFillStyle(XtDisplay(BW), BW->bitmap.frame_gc,
(BW->bitmap.dashed ? FillStippled : FillSolid));
-
+
XDrawRectangle(XtDisplay(BW), XtWindow(BW),
BW->bitmap.frame_gc,
InWindowX(BW, 0) - 1, InWindowY(BW, 0) - 1,
- InWindowX(BW, BW->bitmap.width) - InWindowX(BW, 0) + 1,
+ InWindowX(BW, BW->bitmap.width) - InWindowX(BW, 0) + 1,
InWindowY(BW, BW->bitmap.height) - InWindowY(BW, 0) + 1);
BWUnclip(w);
-
+
BWRedrawGrid(w, 0, 0, BW->bitmap.width - 1, BW->bitmap.height - 1);
}
-void
+void
BWDashed(Widget w, Boolean _switch)
{
BitmapWidget BW = (BitmapWidget) w;
-
+
if (BW->bitmap.dashed != _switch)
BWSwitchDashed(w);
}
-static Boolean
-SetValues(Widget old, Widget request, Widget new,
+static Boolean
+SetValues(Widget old, Widget request, Widget new,
ArgList args, Cardinal *num_args) /* ARGSUSED */
{
BitmapWidget oldbw = (BitmapWidget) old;
@@ -1783,7 +1784,7 @@ SetValues(Widget old, Widget request, Widget new,
XtFree(oldbw->bitmap.filename);
newbw->bitmap.filename = XtNewString(newbw->bitmap.filename);
}
- else
+ else
newbw->bitmap.filename = oldbw->bitmap.filename;
}
@@ -1792,20 +1793,20 @@ SetValues(Widget old, Widget request, Widget new,
XtFree(oldbw->bitmap.basename);
newbw->bitmap.basename = XtNewString(newbw->bitmap.basename);
}
- else
+ else
newbw->bitmap.basename = oldbw->bitmap.basename;
}
-
+
if (NE(bitmap.size)) {
Dimension width, height;
-
- if (BWParseSize(newbw->bitmap.size, &width, &height)) {
+
+ if (BWParseSize(newbw->bitmap.size, &width, &height)) {
ResizeGrid(newbw, width, height);
resize = True;
}
}
-
- if (NE(bitmap.margin) ||
+
+ if (NE(bitmap.margin) ||
NE(bitmap.grid_tolerance) ||
NE(bitmap.squareW) ||
NE(bitmap.squareH) ||
@@ -1815,21 +1816,21 @@ SetValues(Widget old, Widget request, Widget new,
if (NE(bitmap.hot.x) || NE(bitmap.hot.y))
BWSetHotSpot(old, newbw->bitmap.hot.x, newbw->bitmap.hot.y);
-
+
if (NE(bitmap.foreground_pixel) || NE(core.background_pixel)) {
- XSetForeground(XtDisplay(new),
+ XSetForeground(XtDisplay(new),
newbw->bitmap.drawing_gc,
- newbw->bitmap.foreground_pixel
- ^
+ newbw->bitmap.foreground_pixel
+ ^
newbw->core.background_pixel);
redisplay = True;
}
if (NE(bitmap.frame_pixel) || NE(core.background_pixel)) {
- XSetForeground(XtDisplay(new),
+ XSetForeground(XtDisplay(new),
newbw->bitmap.frame_gc,
newbw->bitmap.frame_pixel
- ^
+ ^
newbw->core.background_pixel);
redisplay = True;
}
@@ -1843,14 +1844,14 @@ SetValues(Widget old, Widget request, Widget new,
if (NE(bitmap.highlight_pixel) || NE(core.background_pixel)) {
RedrawStippled(newbw);
- XSetForeground(XtDisplay(new),
+ XSetForeground(XtDisplay(new),
newbw->bitmap.highlighting_gc,
newbw->bitmap.highlight_pixel
- ^
+ ^
newbw->core.background_pixel);
RedrawStippled(newbw);
}
-
+
if (NE(bitmap.stipple)) {
RedrawStippled(newbw);
XSetStipple(XtDisplay(new),
@@ -1858,7 +1859,7 @@ SetValues(Widget old, Widget request, Widget new,
newbw->bitmap.stipple);
RedrawStippled(newbw);
}
-
+
if (resize) Resize((Widget)newbw);
return (redisplay || resize);
@@ -1866,7 +1867,7 @@ SetValues(Widget old, Widget request, Widget new,
#undef NE
}
-Boolean
+Boolean
BWQueryProportional(Widget w)
{
BitmapWidget BW = (BitmapWidget) w;
@@ -1874,7 +1875,7 @@ BWQueryProportional(Widget w)
return (BW->bitmap.proportional);
}
-void
+void
BWSwitchProportional(Widget w)
{
BitmapWidget BW = (BitmapWidget) w;
@@ -1884,13 +1885,13 @@ BWSwitchProportional(Widget w)
Resize((Widget)BW);
if (BW->core.visible)
XClearArea(XtDisplay(BW), XtWindow(BW),
- 0, 0,
+ 0, 0,
BW->core.width, BW->core.height,
True);
}
#if 0
-void
+void
BWProportional(Widget w, Boolean _switch)
{
BitmapWidget BW = (BitmapWidget) w;
@@ -1900,7 +1901,7 @@ BWProportional(Widget w, Boolean _switch)
}
#endif
-void
+void
BWTPaste(Widget w, XEvent *event, String *params, Cardinal *num_params)
{
BitmapWidget BW = (BitmapWidget) w;
@@ -1909,16 +1910,16 @@ BWTPaste(Widget w, XEvent *event, String *params, Cardinal *num_params)
if (!BWQueryStored(w))
return;
-
- BWEngageRequest(w, RestoreRequest, False,
+
+ BWEngageRequest(w, RestoreRequest, False,
(char *)&(event->xbutton.state), sizeof(int));
-
+
OnePointHandler(w,
(BWStatus*) BW->bitmap.request_stack[BW->bitmap.current].status,
event, NULL);
}
-void
+void
BWTMark(Widget w, XEvent *event, String *params, Cardinal *num_params)
{
BitmapWidget BW = (BitmapWidget) w;
@@ -1931,7 +1932,7 @@ BWTMark(Widget w, XEvent *event, String *params, Cardinal *num_params)
}
-void
+void
BWTMarkAll(Widget w, XEvent *event, String *params, Cardinal *num_params)
{
BWMarkAll(w);
@@ -1939,7 +1940,7 @@ BWTMarkAll(Widget w, XEvent *event, String *params, Cardinal *num_params)
BWGrabSelection(w, event->xkey.time);
}
-void
+void
BWTUnmark(Widget w, XEvent *event, String *params, Cardinal *num_params)
{
BWUnmark(w);
diff --git a/app/bitmap/Bitmap.h b/app/bitmap/Bitmap.h
index 9d6d61e71..611f0e0ea 100644
--- a/app/bitmap/Bitmap.h
+++ b/app/bitmap/Bitmap.h
@@ -45,7 +45,7 @@ from The Open Group.
/* Resources:
Name Class RepType Default Value
- ---- ----- ------- -------------
+ ---- ----- ------- -------------
background Background Pixel XtDefaultBackground
foreground Foredround Pixel XtDefaultForeground
highlight Highlight Pixel XtDefaultForeground
@@ -73,7 +73,7 @@ from The Open Group.
stipple Stipple Bitmap XtUnspecifiedPixmap
proportional Proportional Boolean True
axes Axes Boolean True
- button1Function Button1Function ButtonFunction Set
+ button1Function Button1Function ButtonFunction Set
button2Function Button2Function ButtonFunction Invert
button3Function Button3Function ButtonFunction Clear
button4Function Button4Function ButtonFunction Invert
@@ -177,7 +177,7 @@ from The Open Group.
/* bitmap exports */
typedef struct _BWRequestRec BWRequestRec;
-typedef char *BWRequest;
+typedef const char *BWRequest;
/* declare specific BitmapWidget class and instance datatypes */
@@ -187,7 +187,7 @@ typedef struct _BitmapRec *BitmapWidget;
extern WidgetClass bitmapWidgetClass;
-extern Boolean BWEngageRequest(Widget w, BWRequest name, Boolean trap,
+extern Boolean BWEngageRequest(Widget w, BWRequest name, Boolean trap,
XtPointer call_data, Cardinal call_data_size);
extern Boolean BWTerminateRequest(Widget w, Boolean cont);
@@ -224,12 +224,12 @@ extern void BWGrabSelection ( Widget w, Time btime );
extern void BWRequestSelection ( Widget w, Time btime, Boolean wait );
extern void BWSetChanged ( Widget w );
extern Boolean BWQueryChanged ( Widget w );
-extern int BWReadFile ( Widget w, String filename, String basename );
-extern int BWWriteFile ( Widget w, String filename, String basename );
+extern int BWReadFile ( Widget w, _Xconst _XtString filename, _Xconst _XtString basename );
+extern int BWWriteFile ( Widget w, _Xconst _XtString filename, _Xconst _XtString basename );
extern String BWUnparseStatus ( Widget w );
extern String BWGetFilename ( Widget w, String *str );
extern String BWGetBasename ( Widget w, String *str );
-extern void BWChangeBasename ( Widget w, String str );
+extern void BWChangeBasename ( Widget w, _Xconst _XtString str );
extern void BWRemoveAllRequests ( Widget w );
extern void BWClearHotSpot ( Widget w );
extern Boolean BWQueryMarked ( Widget w );
@@ -264,10 +264,10 @@ extern Boolean BWQueryDashed ( Widget w );
extern Boolean BWQueryProportional ( Widget w );
extern void BWSwitchProportional ( Widget w );
extern void BWDrawGrid ( Widget w, Position from_x, Position from_y, Position to_x, Position to_y );
-extern void BWChangeFilename ( Widget w, String str );
+extern void BWChangeFilename ( Widget w, _Xconst _XtString str );
extern Boolean BWParseSize ( String size, Dimension *width, Dimension *height );
extern Boolean BWQuerySelection ( Widget w, Time btime );
-extern int BWStoreFile ( Widget w, String filename, String *basename );
+extern int BWStoreFile ( Widget w, _Xconst _XtString filename, _Xconst _XtString *basename );
extern void BWNotify ( Widget w, XtActionProc proc );
extern void BWTMark ( Widget w, XEvent *event, String *params, Cardinal *num_params );
extern void BWTMarkAll ( Widget w, XEvent *event, String *params, Cardinal *num_params );
diff --git a/app/bitmap/BitmapP.h b/app/bitmap/BitmapP.h
index 7957f2310..08e4c65bf 100644
--- a/app/bitmap/BitmapP.h
+++ b/app/bitmap/BitmapP.h
@@ -47,7 +47,7 @@ typedef struct {
BWRequestRec *requests;
Cardinal num_requests;
BWRequestRec *request[100];
-
+
} BitmapClassPart;
/* Full class record declaration */
@@ -160,18 +160,18 @@ typedef struct _BitmapRec {
(Position)(min((Position)((Dimension)(max(BW->bitmap.horizOffset,x) -\
BW->bitmap.horizOffset) /\
BW->bitmap.squareW), BW->bitmap.width - 1))
-
+
#define InBitmapY(BW, y)\
(Position)(min((Position)((Dimension)(max(BW->bitmap.vertOffset, y) -\
BW->bitmap.vertOffset) /\
BW->bitmap.squareH), BW->bitmap.height - 1))
-
+
#define InWindowX(BW, x)\
(Position) (BW->bitmap.horizOffset + ((x) * BW->bitmap.squareW))
#define InWindowY(BW, y)\
(Position) (BW->bitmap.vertOffset + ((y) * BW->bitmap.squareH))
-
+
#define GetPixmap(BW, image)\
XCreateBitmapFromData(XtDisplay(BW), XtWindow(BW),\
image->data, image->width, image->height)
@@ -197,13 +197,13 @@ typedef struct _BitmapRec {
XImage *CreateBitmapImage(BitmapWidget BW, char *data, Dimension width, Dimension height);
void DestroyBitmapImage(XImage **image);
void TransferImageData(XImage *source, XImage *destination);
-void CopyImageData(XImage *source, XImage *destination,
- Position from_x, Position from_y,
- Position to_x, Position to_y,
+void CopyImageData(XImage *source, XImage *destination,
+ Position from_x, Position from_y,
+ Position to_x, Position to_y,
Position at_x, Position at_y);
XImage *GetImage(BitmapWidget BW, Pixmap pixmap);
XImage *ConvertToBitmapImage(BitmapWidget BW, XImage *image);
-XImage *ScaleBitmapImage(BitmapWidget BW, XImage *src,
+XImage *ScaleBitmapImage(BitmapWidget BW, XImage *src,
double scale_x, double scale_y);
extern Boolean DEBUG;
diff --git a/app/bitmap/ChangeLog b/app/bitmap/ChangeLog
index 14674dfff..4b43f6a48 100644
--- a/app/bitmap/ChangeLog
+++ b/app/bitmap/ChangeLog
@@ -1,3 +1,190 @@
+commit a7909448b89f42ad0bb4834e347e6d3ecb20d7da
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Thu Mar 8 21:40:10 2012 -0800
+
+ bitmap 1.0.6
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 67ab447959b62454f4e0273177baa19711babb96
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Tue Dec 20 21:47:56 2011 -0800
+
+ Use lrint() from math library if available
+
+ Moves -lm from being hardcoded in Makefile.am to being added via
+ AC_SEARCH_LIBS in configure.ac setting it in $(MATH_LIBS)
+
+ Using lrint() [returns long int] instead of rint() [returns double]
+ clears a bunch of gcc warnings of the form:
+ "cast from function call of type ‘double’ to non-matching type ‘short int’"
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 1c2b70d13c42f5461a2d7c3cae7adf8d9b2e3cea
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Fri Oct 14 22:48:31 2011 -0700
+
+ Constify strings in atobm
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 3fc1a649f1e81c4d93c6e00119267208877a8f02
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Fri Oct 14 22:38:44 2011 -0700
+
+ Constify strings in bmtoa
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit a8ee8e937e8d939522f18fa5723afea084221467
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Fri Oct 14 21:25:06 2011 -0700
+
+ Strip trailing whitespace
+
+ Performed with: find * -type f | xargs perl -i -p -e 's{[ \t]+$}{}'
+ git diff -w & git diff -b show no diffs from this change
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 64eacd3665306283d126d0df7cf63a071e576c38
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Fri Oct 14 21:22:26 2011 -0700
+
+ Constify filename string handling
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit ca7bf97b6e83b25e7142b321e5f2325b1e47c2d0
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Fri Oct 14 21:03:48 2011 -0700
+
+ Add const to char * in BWRequest typedef
+
+ Fixes many gcc --Wwrite-string warnings of the form:
+
+ Bitmap.c: In function ‘BWTPaste’:
+ Bitmap.c:1913:7: warning: passing argument 2 of ‘BWEngageRequest’ discards qualifiers from pointer target type
+ Bitmap.h:190:16: note: expected ‘BWRequest’ but argument is of type ‘const char *’
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 6e997556a17a1b4a9d6773602af770b9e9f3751e
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date: Fri Mar 4 20:44:37 2011 -0500
+
+ man: use correct section number when referring to X
+
+ Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit 98e43d4e49c599fc633b4bb9c58d99abbdd0068a
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Thu Feb 17 23:38:40 2011 -0800
+
+ atobm only depends on xproto, not x11
+
+ It only includes <X11/Xos.h>, no headers or functions from libX11.
+ Due to a typo in Makefile.am (also fixed) it wasn't actually linking
+ with libX11 even though it had x11 in its PKG_CHECK_MODULES list.
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit b3f10a08922f568b7cbc791354cf0d4267cd88c1
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Sat Jan 15 10:19:20 2011 -0800
+
+ Use autoconf standard HAVE_MKSTEMP define instead of old imake HAS_MKSTEMP
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit ff81a4e4e894915bb6b8aece8314ca1a854140a4
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Sat Jan 15 10:16:17 2011 -0800
+
+ config: Add missing AC_CONFIG_SRCDIR
+
+ Regroup AC statements under the Autoconf initialization section.
+ Regroup AM statements under the Automake initialization section.
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 2afe9a69417cbd25fc5379faf22eba1a8e94b348
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Fri Jan 14 14:05:14 2011 -0800
+
+ Use fputs instead of fprintf with no format arg to print usage message.
+
+ Clear gcc warning of:
+ BitEdit.c:986: warning: format not a string literal and no format arguments
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+ Reviewed-by: Dirk Wallenstein <halsmit@t-online.de>
+
+commit fcfa5f0dee6549994d8c4640fb61612d33369e74
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Fri Jan 14 14:00:30 2011 -0800
+
+ Call snprintf() directly instead of XmuSnprintf()
+
+ All platforms still supported by X.Org have long had snprintf()
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit e3ecaf24ea4187516a1a0679783278e34e56499f
+Author: Trevor Woerner <twoerner@gmail.com>
+Date: Sat Jan 8 20:15:50 2011 -0500
+
+ Remove unused, leaky scanline.
+
+ The pointer, scanline, doesn't appear to be used anymore, and is
+ leaking memory.
+
+ Signed-off-by: Trevor Woerner <twoerner@gmail.com>
+ Reviewed-by: Adam Jackson <ajax@redhat.com>
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit f705edec1b9aa80d3b93f587048ad33887aca5b6
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date: Wed Jan 12 16:28:01 2011 -0500
+
+ config: replace deprecated AM_CONFIG_HEADER with AC_CONFIG_HEADERS
+
+ This silences an Autoconf warning
+
+commit 0a2eef9a48863dde8b3c7f60f5eb3b9a667fa505
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date: Wed Jan 12 15:29:49 2011 -0500
+
+ config: replace deprecated AC_HELP_STRING with AS_HELP_STRING
+
+ This silences an Automake warning.
+
+ Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit 38f9d56ce050baabc72254240df875a3450f798e
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date: Wed Jan 12 13:10:21 2011 -0500
+
+ config: remove AC_PROG_CC as it overrides AC_PROG_C_C99
+
+ XORG_STRICT_OPTION from XORG_DEFAULT_OPTIONS calls
+ AC_PROG_C_C99. This sets gcc with -std=gnu99.
+ If AC_PROG_CC macro is called afterwards, it resets CC to gcc.
+
+ Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit 2fee85a59998a805ca8161606c5c32953f02f659
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date: Wed Jan 12 11:54:40 2011 -0500
+
+ config: use AC_PROG_INSTALL now supplied by XORG_DEFAULT_OPTIONS
+
+ It depends on util-macros 1.8 or later
+ The existing statement can now be removed from the configuration file.
+
+ Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
commit 99be515efe95cb3eb4bcb29b2bc194f416b31758
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Thu Oct 7 20:04:23 2010 -0700
diff --git a/app/bitmap/CutPaste.c b/app/bitmap/CutPaste.c
index 3a200ee99..49d6f9c59 100644
--- a/app/bitmap/CutPaste.c
+++ b/app/bitmap/CutPaste.c
@@ -34,7 +34,7 @@ from The Open Group.
#include <X11/StringDefs.h>
#include <X11/Xatom.h>
#include "BitmapP.h"
-
+
#include <stdio.h>
#include <math.h>
@@ -48,8 +48,8 @@ from The Open Group.
*****************************************************************************/
/* ARGSUSED */
-static Boolean
-ConvertSelection(Widget w, Atom *selection, Atom *target, Atom *type,
+static Boolean
+ConvertSelection(Widget w, Atom *selection, Atom *target, Atom *type,
XtPointer *val_ret, unsigned long *length, int *format)
{
XPointer *value = (XPointer *)val_ret;
@@ -58,7 +58,7 @@ ConvertSelection(Widget w, Atom *selection, Atom *target, Atom *type,
char *data;
XImage *image;
Dimension width, height;
-
+
switch (*target) {
/* XA_TARGETS undefined ?!?
@@ -79,7 +79,7 @@ ConvertSelection(Widget w, Atom *selection, Atom *target, Atom *type,
height = BW->bitmap.mark.to_y - BW->bitmap.mark.from_y + 1;
data = CreateCleanData(Length(width, height));
image = CreateBitmapImage(BW, data, width, height);
- CopyImageData(BW->bitmap.image, image,
+ CopyImageData(BW->bitmap.image, image,
BW->bitmap.mark.from_x, BW->bitmap.mark.from_y,
BW->bitmap.mark.to_x, BW->bitmap.mark.to_y, 0, 0);
pixmap = (Pixmap *) XtMalloc(sizeof(Pixmap));
@@ -103,7 +103,7 @@ ConvertSelection(Widget w, Atom *selection, Atom *target, Atom *type,
}
/* ARGSUSED */
-static void
+static void
LoseSelection(Widget w, Atom selection)
{
BitmapWidget BW = (BitmapWidget) w;
@@ -116,12 +116,12 @@ LoseSelection(Widget w, Atom selection)
}
/* ARGSUSED */
-static void
+static void
SelectionDone(Widget w, Atom *selection, Atom *target)
{
/* Done Automatically ?!?
- BitmapWidget BW = (BitmapWidget) w;
+ BitmapWidget BW = (BitmapWidget) w;
if (*target != XA_TARGETS)
XtFree(BW->bitmap.value);
@@ -129,14 +129,14 @@ SelectionDone(Widget w, Atom *selection, Atom *target)
*/
}
-void
+void
BWGrabSelection(Widget w, Time btime)
{
BitmapWidget BW = (BitmapWidget) w;
BW->bitmap.selection.own = XtOwnSelection(w, XA_PRIMARY, btime,
- ConvertSelection,
- (XtLoseSelectionProc)LoseSelection,
+ ConvertSelection,
+ (XtLoseSelectionProc)LoseSelection,
SelectionDone);
if (DEBUG && BW->bitmap.selection.own)
fprintf(stderr, "Own the selection\n");
@@ -144,8 +144,8 @@ BWGrabSelection(Widget w, Time btime)
/* ARGSUSED */
-static void
-SelectionCallback(Widget w, XtPointer cldat, Atom *selection, Atom *type,
+static void
+SelectionCallback(Widget w, XtPointer cldat, Atom *selection, Atom *type,
XtPointer val, unsigned long *length, int *format)
{
XPointer value = (XPointer)val;
@@ -153,7 +153,7 @@ SelectionCallback(Widget w, XtPointer cldat, Atom *selection, Atom *type,
Pixmap *pixmap;
switch (*type) {
-
+
case XA_BITMAP:
case XA_PIXMAP:
DestroyBitmapImage(&BW->bitmap.storage);
@@ -161,7 +161,7 @@ SelectionCallback(Widget w, XtPointer cldat, Atom *selection, Atom *type,
BW->bitmap.storage = GetImage(BW, *pixmap);
XFree((char *)pixmap);
break;
-
+
default:
XtWarning(" selection request failed. BitmapWidget");
break;
@@ -170,19 +170,19 @@ SelectionCallback(Widget w, XtPointer cldat, Atom *selection, Atom *type,
BW->bitmap.selection.limbo = FALSE;
}
-void
+void
BWRequestSelection(Widget w, Time btime, Boolean wait)
{
BitmapWidget BW = (BitmapWidget) w;
-
+
if (BW->bitmap.selection.own)
BWStore(w);
else {
XtGetSelectionValue(w, XA_PRIMARY, XA_PIXMAP,
SelectionCallback, NULL, btime);
-
+
BW->bitmap.selection.limbo = TRUE;
-
+
if (wait)
while (BW->bitmap.selection.limbo) {
XEvent event;
@@ -194,7 +194,7 @@ BWRequestSelection(Widget w, Time btime, Boolean wait)
/* ARGSUSED */
/* Returns true if there is a transferable selection */
-Boolean
+Boolean
BWQuerySelection(Widget w, Time btime)
{
/* To be written. XA_TARGETS to be used. So far undefined ?!? */
diff --git a/app/bitmap/Dialog.c b/app/bitmap/Dialog.c
index 3cd525aae..e2e3ac24b 100644
--- a/app/bitmap/Dialog.c
+++ b/app/bitmap/Dialog.c
@@ -36,14 +36,14 @@ from The Open Group.
#include <X11/Xaw/Dialog.h>
#include <X11/Xaw/Command.h>
#include <X11/Xmu/CharSet.h>
-
+
#include "Dialog.h"
#define min(x, y) (((x) < (y)) ? (x) : (y))
#define max(x, y) (((x) > (y)) ? (x) : (y))
-static void SetDialogButton(Widget w, XEvent *event,
+static void SetDialogButton(Widget w, XEvent *event,
String *argv, Cardinal *argc);
static XtActionsRec actions_table[] = {
@@ -63,22 +63,22 @@ static DialogButton dialog_buttons[] = {
static unsigned long selected;
/* ARGSUSED */
-static void
+static void
SetSelected(Widget w, XtPointer clientData, XtPointer callData) /* ARGSUSED */
{
String name = (String)clientData;
int i;
-
- for (i = 0; i < XtNumber(dialog_buttons); i++)
- if (!strcmp(dialog_buttons[i].name, name))
+
+ for (i = 0; i < XtNumber(dialog_buttons); i++)
+ if (!strcmp(dialog_buttons[i].name, name))
selected |= dialog_buttons[i].flag;
}
/* ARGSUSED */
-static void
+static void
SetDialogButton(Widget w, /* not used */
XEvent *event, /* not used */
- String *argv,
+ String *argv,
Cardinal *argc)
{
char button_name[80];
@@ -93,7 +93,7 @@ SetDialogButton(Widget w, /* not used */
static Boolean firstTime = True;
-Dialog
+Dialog
CreateDialog(Widget top_widget, String name, unsigned long options)
{
int i;
@@ -107,17 +107,17 @@ CreateDialog(Widget top_widget, String name, unsigned long options)
firstTime = False;
}
popup->top_widget = top_widget;
- popup->shell_widget = XtCreatePopupShell(name,
- transientShellWidgetClass,
+ popup->shell_widget = XtCreatePopupShell(name,
+ transientShellWidgetClass,
top_widget, NULL, 0);
- popup->dialog_widget = XtCreateManagedWidget("dialog",
+ popup->dialog_widget = XtCreateManagedWidget("dialog",
dialogWidgetClass,
- popup->shell_widget,
+ popup->shell_widget,
NULL, 0);
for (i = 0; i < XtNumber(dialog_buttons); i++)
if (options & dialog_buttons[i].flag)
- XawDialogAddButton(popup->dialog_widget,
- dialog_buttons[i].name,
+ XawDialogAddButton(popup->dialog_widget,
+ dialog_buttons[i].name,
SetSelected, dialog_buttons[i].name);
popup->options = options;
return popup;
@@ -126,17 +126,17 @@ CreateDialog(Widget top_widget, String name, unsigned long options)
return NULL;
}
-void
+void
PopdownDialog(Dialog popup, String *answer)
{
if (answer)
*answer = XawDialogGetValueString(popup->dialog_widget);
-
+
XtPopdown(popup->shell_widget);
}
-unsigned long
-PopupDialog(Dialog popup, String message, String suggestion,
+unsigned long
+PopupDialog(Dialog popup, String message, String suggestion,
String *answer, XtGrabKind grab)
{
Position popup_x, popup_y, top_x, top_y;
@@ -164,14 +164,14 @@ PopupDialog(Dialog popup, String message, String suggestion,
XtSetArg(wargs[n], XtNborderWidth, &border_width); n++;
XtGetValues(popup->shell_widget, wargs, n);
- popup_x = max(0,
- min(top_x + ((Position)top_width - (Position)popup_width) / 2,
- (Position)DisplayWidth(XtDisplay(popup->shell_widget),
+ popup_x = max(0,
+ min(top_x + ((Position)top_width - (Position)popup_width) / 2,
+ (Position)DisplayWidth(XtDisplay(popup->shell_widget),
DefaultScreen(XtDisplay(popup->shell_widget))) -
(Position)popup_width - 2 * (Position)border_width));
- popup_y = max(0,
+ popup_y = max(0,
min(top_y + ((Position)top_height - (Position)popup_height) / 2,
- (Position)DisplayHeight(XtDisplay(popup->shell_widget),
+ (Position)DisplayHeight(XtDisplay(popup->shell_widget),
DefaultScreen(XtDisplay(popup->shell_widget))) -
(Position)popup_height - 2 * (Position)border_width));
n = 0;
@@ -182,9 +182,9 @@ PopupDialog(Dialog popup, String message, String suggestion,
selected = None;
XtPopup(popup->shell_widget, grab);
- XWarpPointer(XtDisplay(popup->shell_widget),
+ XWarpPointer(XtDisplay(popup->shell_widget),
XtWindow(popup->top_widget),
- XtWindow(popup->shell_widget),
+ XtWindow(popup->shell_widget),
0, 0, top_width, top_height,
popup_width / 2, popup_height / 2);
diff --git a/app/bitmap/Graphics.c b/app/bitmap/Graphics.c
index f09c41b80..43c48b9b4 100644
--- a/app/bitmap/Graphics.c
+++ b/app/bitmap/Graphics.c
@@ -30,13 +30,17 @@ from The Open Group.
* Author: Davor Matic, MIT X Consortium
*/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <X11/IntrinsicP.h>
#include <X11/StringDefs.h>
#include <X11/Xfuncs.h>
#include "BitmapP.h"
#include "Bitmap.h"
#include "Requests.h"
-
+
#include <stdio.h>
#include <math.h>
@@ -46,7 +50,11 @@ from The Open Group.
#define min(x, y) (((int)(x) < (int)(y)) ? (x) : (y))
#define max(x, y) (((int)(x) > (int)(y)) ? (x) : (y))
#ifndef rint
-#define rint(x) floor(x + 0.5)
+# if HAVE_LRINT
+# define rint(x) lrint(x)
+# else
+# define rint(x) floor(x + 0.5)
+# endif
#endif
/*****************************************************************************\
@@ -58,11 +66,11 @@ from The Open Group.
(1 << ((x) % 8))) ? 1 : 0))
#if 0
-bit
+bit
BWGetBit(Widget w, Position x, Position y)
{
BitmapWidget BW = (BitmapWidget) w;
-
+
if (QueryInBitmap(BW, x, y))
return GetBit(BW->bitmap.image, x, y);
else
@@ -90,7 +98,7 @@ BWGetBit(Widget w, Position x, Position y)
InWindowX(BW, x), InWindowY(BW, y),\
BW->bitmap.squareW, BW->bitmap.squareH)
/*
-void
+void
HighlightSquare(BitmapWidget BW, Position x, Position y)
{
XFillRectangle(XtDisplay(BW), XtWindow(BW),
@@ -104,10 +112,10 @@ HighlightSquare(BitmapWidget BW, Position x, Position y)
XFillRectangle(XtDisplay(BW), XtWindow(BW),\
BW->bitmap.drawing_gc,\
InWindowX(BW, x), InWindowY(BW, y),\
- BW->bitmap.squareW, BW->bitmap.squareH)
+ BW->bitmap.squareW, BW->bitmap.squareH)
/*
-void
+void
DrawSquare(BitmapWidget BW, Position x, Position y)
{
XFillRectangle(XtDisplay(BW), XtWindow(BW),
@@ -124,11 +132,11 @@ DrawSquare(BitmapWidget BW, Position x, Position y)
if (GetBit(BW->bitmap.image, x, y) != value)\
InvertPoint(BW, x, y)
-void
+void
BWDrawPoint(Widget w, Position x, Position y, bit value)
{
BitmapWidget BW = (BitmapWidget) w;
-
+
if (QueryInBitmap(BW, x, y)) {
if (value == Highlight)
HighlightSquare(BW, x, y);
@@ -141,7 +149,7 @@ static XPoint *
HotSpotShape(BitmapWidget BW, Position x, Position y)
{
static XPoint points[5];
-
+
points[0].x = InWindowX(BW, x);
points[0].y = InWindowY(BW, y + 1.0/2);
points[1].x = InWindowX(BW, x + 1.0/2);
@@ -152,7 +160,7 @@ HotSpotShape(BitmapWidget BW, Position x, Position y)
points[3].y = InWindowY(BW, y);
points[4].x = InWindowX(BW, x);
points[4].y = InWindowY(BW, y + 1.0/2);
-
+
return points;
}
@@ -169,7 +177,7 @@ XImage *CreateBitmapImage();
void DestroyBitmapImage();
*/
-void
+void
BWRedrawHotSpot(Widget w)
{
BitmapWidget BW = (BitmapWidget) w;
@@ -178,22 +186,22 @@ BWRedrawHotSpot(Widget w)
DrawHotSpot(BW, BW->bitmap.hot.x, BW->bitmap.hot.y);
}
-void
+void
BWClearHotSpot(Widget w)
{
BitmapWidget BW = (BitmapWidget) w;
-
+
if (QuerySet(BW->bitmap.hot.x, BW->bitmap.hot.y)) {
DrawHotSpot(BW, BW->bitmap.hot.x, BW->bitmap.hot.y);
BW->bitmap.hot.x = BW->bitmap.hot.y = NotSet;
}
}
-void
+void
BWDrawHotSpot(Widget w, Position x, Position y, int value)
{
BitmapWidget BW = (BitmapWidget) w;
-
+
if (QueryInBitmap(BW, x, y)) {
if (QuerySet(BW->bitmap.hot.x, BW->bitmap.hot.y) &&
((BW->bitmap.hot.x == x) && (BW->bitmap.hot.y == y))) {
@@ -208,13 +216,13 @@ BWDrawHotSpot(Widget w, Position x, Position y, int value)
BW->bitmap.hot.x = x;
BW->bitmap.hot.y = y;
}
-
+
if (value == Highlight)
- HighlightHotSpot(BW, x, y);
+ HighlightHotSpot(BW, x, y);
}
}
-void
+void
BWSetHotSpot(Widget w, Position x, Position y)
{
if (QuerySet(x, y))
@@ -225,9 +233,9 @@ BWSetHotSpot(Widget w, Position x, Position y)
/* high level procedures */
-void
-BWRedrawSquares(Widget w,
- Position x, Position y,
+void
+BWRedrawSquares(Widget w,
+ Position x, Position y,
Dimension width, Dimension height)
{
BitmapWidget BW = (BitmapWidget) w;
@@ -242,44 +250,44 @@ BWRedrawSquares(Widget w,
from_y = max(0, from_y);
to_x = min(BW->bitmap.image->width - 1, to_x);
to_y = min(BW->bitmap.image->height - 1, to_y);
-
+
for (x = from_x; x <= to_x; x++)
for (y = from_y; y <= to_y; y++)
if (GetBit(BW->bitmap.image, x, y)) DrawSquare(BW, x, y);
}
-void
-BWDrawGrid(Widget w,
- Position from_x, Position from_y,
+void
+BWDrawGrid(Widget w,
+ Position from_x, Position from_y,
Position to_x, Position to_y)
{
BitmapWidget BW = (BitmapWidget) w;
int i;
-
+
QuerySwap(from_x, to_x);
QuerySwap(from_y, to_y);
from_x = max(0, from_x);
from_y = max(0, from_y);
to_x = min(BW->bitmap.image->width - 1, to_x);
to_y = min(BW->bitmap.image->height - 1, to_y);
-
+
for(i = from_x + (from_x == 0); i <= to_x; i++)
- XDrawLine(XtDisplay(BW), XtWindow(BW),
+ XDrawLine(XtDisplay(BW), XtWindow(BW),
BW->bitmap.frame_gc,
InWindowX(BW, i), InWindowY(BW, from_y),
InWindowX(BW, i), InWindowY(BW, to_y + 1));
-
+
for(i = from_y + (from_y == 0); i <= to_y; i++)
- XDrawLine(XtDisplay(BW), XtWindow(BW),
+ XDrawLine(XtDisplay(BW), XtWindow(BW),
BW->bitmap.frame_gc,
InWindowX(BW, from_x), InWindowY(BW, i),
InWindowX(BW, to_x + 1), InWindowY(BW, i));
}
-void
-BWRedrawGrid(Widget w,
- Position x, Position y,
+void
+BWRedrawGrid(Widget w,
+ Position x, Position y,
Dimension width, Dimension height)
{
BitmapWidget BW = (BitmapWidget) w;
@@ -292,9 +300,9 @@ BWRedrawGrid(Widget w,
BWDrawGrid(w, from_x, from_y, to_x, to_y);
}
-void
-BWDrawLine(Widget w,
- Position from_x, Position from_y,
+void
+BWDrawLine(Widget w,
+ Position from_x, Position from_y,
Position to_x, Position to_y, int value)
{
Position i;
@@ -319,9 +327,9 @@ BWDrawLine(Widget w,
BWDrawPoint(w, from_x, from_y, value);
}
-void
-BWBlindLine(Widget w,
- Position from_x, Position from_y,
+void
+BWBlindLine(Widget w,
+ Position from_x, Position from_y,
Position to_x, Position to_y, int value)
{
Position i;
@@ -348,22 +356,22 @@ BWBlindLine(Widget w,
BWDrawPoint(w, from_x, from_y, value);
}
-void
-BWDrawRectangle(Widget w,
- Position from_x, Position from_y,
+void
+BWDrawRectangle(Widget w,
+ Position from_x, Position from_y,
Position to_x, Position to_y, int value)
{
register Position i;
Dimension delta, width, height;
-
+
QuerySwap(from_x, to_x);
QuerySwap(from_y, to_y);
-
+
width = to_x - from_x;
height = to_y - from_y;
delta = max(width, height);
-
+
if (!QueryZero(width, height)) {
for (i = 0; (int)i < (int)delta; i++) {
if ((int)i < (int)width) {
@@ -377,35 +385,35 @@ BWDrawRectangle(Widget w,
}
}
else
- BWDrawLine(w,
- from_x, from_y,
+ BWDrawLine(w,
+ from_x, from_y,
to_x, to_y, value);
}
-
-void
-BWDrawFilledRectangle(Widget w,
- Position from_x, Position from_y,
+
+void
+BWDrawFilledRectangle(Widget w,
+ Position from_x, Position from_y,
Position to_x, Position to_y, int value)
{
register Position x, y;
QuerySwap(from_x, to_x);
QuerySwap(from_y, to_y);
-
+
for (x = from_x; x <= to_x; x++)
for (y = from_y; y <= to_y; y++)
BWDrawPoint(w, x, y, value);
}
-void
-BWDrawCircle(Widget w,
- Position origin_x, Position origin_y,
+void
+BWDrawCircle(Widget w,
+ Position origin_x, Position origin_y,
Position point_x, Position point_y, int value)
{
register Position i, delta;
Dimension dx, dy, half;
double radius;
-
+
dx = abs(point_x - origin_x);
dy = abs(point_y - origin_y);
radius = sqrt((double) ((int)dx * (int)dx + (int)dy * (int)dy));
@@ -434,19 +442,19 @@ BWDrawCircle(Widget w,
}
}
-void
-BWDrawFilledCircle(Widget w,
- Position origin_x, Position origin_y,
+void
+BWDrawFilledCircle(Widget w,
+ Position origin_x, Position origin_y,
Position point_x, Position point_y, int value)
{
register Position i, j, delta;
Dimension dx, dy;
double radius;
-
+
dx = abs(point_x - origin_x);
dy = abs(point_y - origin_y);
radius = sqrt((double) ((int)dx * (int)dx + (int)dy * (int)dy));
- for(j = origin_x - (Position) floor(radius);
+ for(j = origin_x - (Position) floor(radius);
j <= origin_x + (Position) floor(radius); j++)
BWDrawPoint(w, j, origin_y, value);
for(i = 1; i <= (Position) floor(radius); i++) {
@@ -467,7 +475,7 @@ BWDrawFilledCircle(Widget w,
else InvertPoint(BW, x, y);}
/*
-static void
+static void
FloodLoop(BitmapWidget BW, Position x, Position y, int value)
{
if (QueryFlood(BW, x, y, value)) {
@@ -480,12 +488,12 @@ FloodLoop(BitmapWidget BW, Position x, Position y, int value)
}
*/
-static void
+static void
FloodLoop(BitmapWidget BW, Position x, Position y, int value)
{
Position save_x, save_y, x_left, x_right;
-
- if (QueryFlood(BW, x, y, value))
+
+ if (QueryFlood(BW, x, y, value))
Flood(BW, x, y, value)
@@ -511,28 +519,28 @@ FloodLoop(BitmapWidget BW, Position x, Position y, int value)
x = x_left;
y = save_y;
y++;
-
+
while (x <= x_right) {
Boolean flag = False;
Position x_enter;
-
+
while (QueryFlood(BW, x, y, value) && (x <= x_right)) {
flag = True;
x++;
}
-
+
if (flag) {
if ((x == x_right) && QueryFlood(BW, x, y, value))
FloodLoop(BW, x, y, value);
else
FloodLoop(BW, x - 1, y, value);
}
-
+
x_enter = x;
-
+
while (!QueryFlood(BW, x, y, value) && (x < x_right))
x++;
-
+
if (x == x_enter) x++;
}
@@ -543,29 +551,29 @@ FloodLoop(BitmapWidget BW, Position x, Position y, int value)
while (x <= x_right) {
Boolean flag = False;
Position x_enter;
-
+
while (QueryFlood(BW, x, y, value) && (x <= x_right)) {
flag = True;
x++;
}
-
+
if (flag) {
if ((x == x_right) && QueryFlood(BW, x, y, value))
FloodLoop(BW, x, y, value);
else
FloodLoop(BW, x - 1, y, value);
}
-
+
x_enter = x;
-
+
while (!QueryFlood(BW, x, y, value) && (x < x_right))
x++;
-
+
if (x == x_enter) x++;
}
}
-void
+void
BWFloodFill(Widget w, Position x, Position y, int value)
{
BitmapWidget BW = (BitmapWidget) w;
@@ -576,7 +584,7 @@ BWFloodFill(Widget w, Position x, Position y, int value)
if (value == Invert)
FloodLoop(BW, x, y, (pixel ? Clear : Set));
else if (value != pixel)
- FloodLoop(BW, x, y, value);
+ FloodLoop(BW, x, y, value);
}
#define QueryHotInMark(BW)\
@@ -586,7 +594,7 @@ BWFloodFill(Widget w, Position x, Position y, int value)
(BW->bitmap.hot.y == max(BW->bitmap.mark.from_y,\
min(BW->bitmap.hot.y, BW->bitmap.mark.to_y))))
-void
+void
BWUp(Widget w)
{
BitmapWidget BW = (BitmapWidget) w;
@@ -609,12 +617,12 @@ BWUp(Widget w)
if ((to_y - from_y) == 0)
return;
-
+
for(x = from_x; x <= to_x; x++) {
first = up = GetBit(BW->bitmap.image, x, to_y);
for(y = to_y - 1; y >= from_y; y--) {
down = GetBit(BW->bitmap.image, x, y);
- if (up != down)
+ if (up != down)
InvertPoint(BW, x, y);
up =down;
}
@@ -627,12 +635,12 @@ BWUp(Widget w)
!BWQueryMarked(w))
BWSetHotSpot(w,
BW->bitmap.hot.x,
- (BW->bitmap.hot.y - 1 + BW->bitmap.image->height) %
+ (BW->bitmap.hot.y - 1 + BW->bitmap.image->height) %
BW->bitmap.image->height);
}
-void
+void
BWDown(Widget w)
{
BitmapWidget BW = (BitmapWidget) w;
@@ -664,10 +672,10 @@ BWDown(Widget w)
InvertPoint(BW, x, y);
down = up;
}
- if(first != up)
+ if(first != up)
InvertPoint(BW, x, from_y);
}
-
+
if (QuerySet(BW->bitmap.hot.x, BW->bitmap.hot.y)
&&
!BWQueryMarked(w))
@@ -676,14 +684,14 @@ BWDown(Widget w)
(BW->bitmap.hot.y + 1) % BW->bitmap.image->height);
}
-void
+void
BWLeft(Widget w)
{
BitmapWidget BW = (BitmapWidget) w;
register Position x, y;
bit first, left, right=0;
Position from_x, from_y, to_x, to_y;
-
+
if (BWQueryMarked(w)) {
from_x = BW->bitmap.mark.from_x;
from_y = BW->bitmap.mark.from_y;
@@ -699,7 +707,7 @@ BWLeft(Widget w)
if ((to_x - from_x) == 0)
return;
-
+
for(y = from_y; y <= to_y; y++) {
first = left = GetBit(BW->bitmap.image, to_x, y);
for(x = to_x - 1; x >= from_x; x--) {
@@ -711,24 +719,24 @@ BWLeft(Widget w)
if(first != right)
InvertPoint(BW, to_x, y);
}
-
+
if (QuerySet(BW->bitmap.hot.x, BW->bitmap.hot.y)
&&
!BWQueryMarked(w))
BWSetHotSpot(w,
- (BW->bitmap.hot.x - 1 + BW->bitmap.image->width) %
+ (BW->bitmap.hot.x - 1 + BW->bitmap.image->width) %
BW->bitmap.image->width,
BW->bitmap.hot.y);
}
-void
+void
BWRight(Widget w)
{
BitmapWidget BW = (BitmapWidget) w;
register Position x, y;
bit first, right, left=0;
Position from_x, from_y, to_x, to_y;
-
+
if (BWQueryMarked(w)) {
from_x = BW->bitmap.mark.from_x;
from_y = BW->bitmap.mark.from_y;
@@ -741,10 +749,10 @@ BWRight(Widget w)
to_x = BW->bitmap.width - 1;
to_y = BW->bitmap.height - 1;
}
-
+
if ((to_x - from_x) == 0)
return;
-
+
for(y = from_y; y <= to_y; y++) {
first = right = GetBit(BW->bitmap.image, from_x, y);
for(x = from_x + 1; x <= to_x; x++) {
@@ -767,7 +775,7 @@ BWRight(Widget w)
/* void TransferImageData(); */
-void
+void
BWFold(Widget w)
{
BitmapWidget BW = (BitmapWidget) w;
@@ -775,12 +783,12 @@ BWFold(Widget w)
Dimension horiz, vert;
char *storage_data;
XImage *storage;
-
- storage_data = CreateCleanData(Length(BW->bitmap.image->width,
+
+ storage_data = CreateCleanData(Length(BW->bitmap.image->width,
BW->bitmap.image->height));
- storage = CreateBitmapImage(BW, storage_data,
- (Dimension) BW->bitmap.image->width,
+ storage = CreateBitmapImage(BW, storage_data,
+ (Dimension) BW->bitmap.image->width,
(Dimension) BW->bitmap.image->height);
TransferImageData(BW->bitmap.image, storage);
@@ -788,21 +796,21 @@ BWFold(Widget w)
BW->bitmap.fold ^= True;
horiz = (BW->bitmap.image->width + BW->bitmap.fold) / 2;
vert = (BW->bitmap.image->height + BW->bitmap.fold) / 2;
-
+
for (x = 0; x < BW->bitmap.image->width; x++)
for (y = 0; y < BW->bitmap.image->height; y++) {
new_x = (int)(x + horiz) % (int)BW->bitmap.image->width;
new_y = (int)(y + vert) % (int)BW->bitmap.image->height;
- if(GetBit(BW->bitmap.image, new_x, new_y) !=
+ if(GetBit(BW->bitmap.image, new_x, new_y) !=
GetBit(storage, x, y))
InvertPoint(BW, new_x, new_y);
}
-
+
DestroyBitmapImage(&storage);
if (QuerySet(BW->bitmap.hot.x, BW->bitmap.hot.y))
- BWSetHotSpot(w,
- (Position)
+ BWSetHotSpot(w,
+ (Position)
((int)(BW->bitmap.hot.x+horiz)
%(int)BW->bitmap.image->width),
(Position)
@@ -812,7 +820,7 @@ BWFold(Widget w)
}
-void
+void
BWClear(Widget w)
{
BitmapWidget BW = (BitmapWidget) w;
@@ -825,32 +833,32 @@ BWClear(Widget w)
for (y = 0; y < BW->bitmap.image->height; y++)
if (GetBit(BW->bitmap.image, x, y))
DrawSquare(BW, x, y);
-
+
for (i = 0; i < length; i++)
BW->bitmap.image->data[i] = 0;
}
-void
+void
BWSet(Widget w)
{
BitmapWidget BW = (BitmapWidget) w;
register Position x, y;
int i, length;
-
+
length = Length(BW->bitmap.image->width, BW->bitmap.image->height);
-
+
for (x = 0; x < BW->bitmap.image->width; x++)
for (y = 0; y < BW->bitmap.image->height; y++)
if (!GetBit(BW->bitmap.image, x, y))
DrawSquare(BW, x, y);
-
+
for (i = 0; i < length; i++)
BW->bitmap.image->data[i] = (char)255;
}
-
-void
+
+void
BWRedraw(Widget w)
{
BitmapWidget BW = (BitmapWidget) w;
@@ -860,7 +868,7 @@ BWRedraw(Widget w)
True);
}
-void
+void
BWInvert(Widget w)
{
BitmapWidget BW = (BitmapWidget) w;
@@ -873,19 +881,19 @@ BWInvert(Widget w)
InWindowX(BW, 0), InWindowY(BW, 0),
InWindowX(BW, BW->bitmap.image->width) - InWindowX(BW, 0),
InWindowY(BW, BW->bitmap.image->height) - InWindowY(BW, 0));
-
+
for (i = 0; i < length; i++)
BW->bitmap.image->data[i] ^= 255;
}
-void
+void
BWFlipHoriz(Widget w)
{
BitmapWidget BW = (BitmapWidget) w;
register Position x, y;
Position from_x, from_y, to_x, to_y;
float half;
-
+
if (BWQueryMarked(w)) {
from_x = BW->bitmap.mark.from_x;
from_y = BW->bitmap.mark.from_y;
@@ -899,18 +907,18 @@ BWFlipHoriz(Widget w)
to_y = BW->bitmap.height - 1;
}
half = (float) (to_y - from_y) / 2.0 + 0.5;
-
+
if (half == 0.0)
return;
-
- for (x = from_x; x <= to_x; x++)
+
+ for (x = from_x; x <= to_x; x++)
for (y = 0; y < half; y++)
- if (GetBit(BW->bitmap.image, x, from_y + y) !=
+ if (GetBit(BW->bitmap.image, x, from_y + y) !=
GetBit(BW->bitmap.image, x, to_y - y)) {
InvertPoint(BW, x, from_y + y);
InvertPoint(BW, x, to_y - y);
}
-
+
if (QuerySet(BW->bitmap.hot.x, BW->bitmap.hot.y)
&&
!BWQueryMarked(w))
@@ -919,14 +927,14 @@ BWFlipHoriz(Widget w)
BW->bitmap.image->height - 1 - BW->bitmap.hot.y);
}
-void
+void
BWFlipVert(Widget w)
{
BitmapWidget BW = (BitmapWidget) w;
register Position x, y;
Position from_x, from_y, to_x, to_y;
float half;
-
+
if (BWQueryMarked(w)) {
from_x = BW->bitmap.mark.from_x;
from_y = BW->bitmap.mark.from_y;
@@ -946,12 +954,12 @@ BWFlipVert(Widget w)
for (y = from_y; y <= to_y; y++)
for (x = 0; x < half; x++)
- if (GetBit(BW->bitmap.image, from_x + x, y) !=
+ if (GetBit(BW->bitmap.image, from_x + x, y) !=
GetBit(BW->bitmap.image, to_x - x, y)) {
InvertPoint(BW, from_x + x, y);
InvertPoint(BW, to_x - x, y);
}
-
+
if (QuerySet(BW->bitmap.hot.x, BW->bitmap.hot.y)
&&
!BWQueryMarked(w))
@@ -961,7 +969,7 @@ BWFlipVert(Widget w)
}
-void
+void
BWRotateRight(Widget w)
{
BitmapWidget BW = (BitmapWidget) w;
@@ -970,7 +978,7 @@ BWRotateRight(Widget w)
XPoint hot;
bit quad1, quad2, quad3, quad4;
Position from_x, from_y, to_x, to_y;
-
+
if (BWQueryMarked(w)) {
from_x = BW->bitmap.mark.from_x;
from_y = BW->bitmap.mark.from_y;
@@ -988,41 +996,41 @@ BWRotateRight(Widget w)
half_height = floor((to_y - from_y ) / 2.0 + 0.5);
shift = min((Position)(to_x - from_x), (Position)(to_y - from_y )) % 2;
delta = min((Position) half_width, (Position) half_height) - shift;
-
+
for (x = 0; x <= delta; x++) {
for (y = 1 - shift; y <= delta; y++) {
- quad1 = GetBit(BW->bitmap.image,
- from_x + (Position)half_width + x,
+ quad1 = GetBit(BW->bitmap.image,
+ from_x + (Position)half_width + x,
from_y + (Position)half_height + y);
- quad2 = GetBit(BW->bitmap.image,
- from_x + (Position)half_width + y,
+ quad2 = GetBit(BW->bitmap.image,
+ from_x + (Position)half_width + y,
from_y + (Position)half_height - shift - x);
- quad3 = GetBit(BW->bitmap.image,
- from_x + (Position)half_width - shift - x,
+ quad3 = GetBit(BW->bitmap.image,
+ from_x + (Position)half_width - shift - x,
from_y + (Position)half_height - shift - y);
- quad4 = GetBit(BW->bitmap.image,
- from_x + (Position)half_width - shift - y,
+ quad4 = GetBit(BW->bitmap.image,
+ from_x + (Position)half_width - shift - y,
from_y + (Position)half_height + x);
if (quad1 != quad2)
- InvertPoint(BW,
- from_x + (Position)half_width + x,
+ InvertPoint(BW,
+ from_x + (Position)half_width + x,
from_y + (Position)half_height + y);
if (quad2 != quad3)
- InvertPoint(BW,
- from_x + (Position)half_width + y,
+ InvertPoint(BW,
+ from_x + (Position)half_width + y,
from_y + (Position)half_height - shift - x);
if (quad3 != quad4)
- InvertPoint(BW,
+ InvertPoint(BW,
from_x + (Position)half_width - shift - x,
from_y + (Position)half_height - shift - y);
if (quad4 != quad1)
- InvertPoint(BW,
- from_x + (Position)half_width - shift - y,
+ InvertPoint(BW,
+ from_x + (Position)half_width - shift - y,
from_y + (Position)half_height + x);
}
}
-
+
if (QuerySet(BW->bitmap.hot.x, BW->bitmap.hot.y)
&&
!BWQueryMarked(w)) {
@@ -1040,10 +1048,10 @@ BWRotateRight(Widget w)
if (QueryInBitmap(BW, hot.x, hot.y))
BWSetHotSpot(w, hot.x, hot.y);
}
-
+
}
-void
+void
BWRotateLeft(Widget w)
{
BitmapWidget BW = (BitmapWidget) w;
@@ -1052,7 +1060,7 @@ BWRotateLeft(Widget w)
XPoint hot;
bit quad1, quad2, quad3, quad4;
Position from_x, from_y, to_x, to_y;
-
+
if (BWQueryMarked(w)) {
from_x = BW->bitmap.mark.from_x;
from_y = BW->bitmap.mark.from_y;
@@ -1070,41 +1078,41 @@ BWRotateLeft(Widget w)
half_height = floor((to_y - from_y ) / 2.0 + 0.5);
shift = min((Position)(to_x - from_x), (Position)(to_y - from_y )) % 2;
delta = min((Position) half_width, (Position) half_height) - shift;
-
+
for (x = 0; x <= delta; x++) {
for (y = 1 - shift; y <= delta; y++) {
- quad1 = GetBit(BW->bitmap.image,
- from_x + (Position)half_width + x,
+ quad1 = GetBit(BW->bitmap.image,
+ from_x + (Position)half_width + x,
from_y + (Position)half_height + y);
- quad2 = GetBit(BW->bitmap.image,
- from_x + (Position)half_width + y,
+ quad2 = GetBit(BW->bitmap.image,
+ from_x + (Position)half_width + y,
from_y + (Position)half_height - shift - x);
- quad3 = GetBit(BW->bitmap.image,
- from_x + (Position)half_width - shift - x,
+ quad3 = GetBit(BW->bitmap.image,
+ from_x + (Position)half_width - shift - x,
from_y + (Position)half_height - shift - y);
- quad4 = GetBit(BW->bitmap.image,
- from_x + (Position)half_width - shift - y,
+ quad4 = GetBit(BW->bitmap.image,
+ from_x + (Position)half_width - shift - y,
from_y + (Position)half_height + x);
if (quad1 != quad4)
- InvertPoint(BW,
- from_x + (Position)half_width + x,
+ InvertPoint(BW,
+ from_x + (Position)half_width + x,
from_y + (Position)half_height + y);
if (quad2 != quad1)
- InvertPoint(BW,
- from_x + (Position)half_width + y,
+ InvertPoint(BW,
+ from_x + (Position)half_width + y,
from_y + (Position)half_height - shift - x);
if (quad3 != quad2)
- InvertPoint(BW,
+ InvertPoint(BW,
from_x + (Position)half_width - shift - x,
from_y + (Position)half_height - shift - y);
if (quad4 != quad3)
- InvertPoint(BW,
- from_x + (Position)half_width - shift - y,
+ InvertPoint(BW,
+ from_x + (Position)half_width - shift - y,
from_y + (Position)half_height + x);
}
}
-
+
if (QuerySet(BW->bitmap.hot.x, BW->bitmap.hot.y)
&&
!BWQueryMarked(w)) {
@@ -1125,17 +1133,17 @@ BWRotateLeft(Widget w)
}
-void
-CopyImageData(XImage *source, XImage *destination,
- Position from_x, Position from_y,
- Position to_x, Position to_y,
+void
+CopyImageData(XImage *source, XImage *destination,
+ Position from_x, Position from_y,
+ Position to_x, Position to_y,
Position at_x, Position at_y)
{
Position x, y, delta_x, delta_y;
-
+
delta_x = to_x - from_x + 1;
delta_y = to_y - from_y + 1;
-
+
for (x = 0; x < delta_x; x++)
for (y = 0; y < delta_y; y++)
if (GetBit(source, from_x + x, from_y + y))
@@ -1143,17 +1151,17 @@ CopyImageData(XImage *source, XImage *destination,
else
ClearBit(destination, at_x + x, at_y + y);
}
-
+
XImage *
ConvertToBitmapImage(BitmapWidget BW, XImage *image)
{
XImage *bitmap_image;
char *data;
Position x, y;
-
+
data = CreateCleanData(Length(image->width, image->height));
- bitmap_image = CreateBitmapImage(BW, data,
- (Dimension) image->width,
+ bitmap_image = CreateBitmapImage(BW, data,
+ (Dimension) image->width,
(Dimension) image->height);
for (x = 0; x < min(image->width, bitmap_image->width); x++)
@@ -1164,18 +1172,18 @@ ConvertToBitmapImage(BitmapWidget BW, XImage *image)
return bitmap_image;
}
-void
+void
TransferImageData(XImage *source, XImage *destination)
{
Position x, y;
-
+
for (x = 0; x < min(source->width, destination->width); x++)
for (y = 0; y < min(source->height, destination->height); y++)
if (GetBit(source, x, y) != GetBit(destination, x, y))
InvertBit(destination, x, y);
}
-void
+void
BWStore(Widget w)
{
BitmapWidget BW = (BitmapWidget) w;
@@ -1188,7 +1196,7 @@ BWStore(Widget w)
width = BW->bitmap.mark.to_x - BW->bitmap.mark.from_x + 1;
height = BW->bitmap.mark.to_y - BW->bitmap.mark.from_y + 1;
-
+
storage_data = CreateCleanData(Length(width, height));
BW->bitmap.storage = CreateBitmapImage(BW,
@@ -1202,11 +1210,11 @@ BWStore(Widget w)
}
}
-void
+void
BWClearMarked(Widget w)
{
BitmapWidget BW = (BitmapWidget) w;
-
+
if (QuerySet(BW->bitmap.mark.from_x, BW->bitmap.mark.from_y))
BWDrawFilledRectangle(w,
BW->bitmap.mark.from_x,
@@ -1217,34 +1225,34 @@ BWClearMarked(Widget w)
}
-void
+void
BWDragMarked(Widget w, Position at_x, Position at_y)
{
BitmapWidget BW = (BitmapWidget) w;
if (QuerySet(BW->bitmap.mark.from_x, BW->bitmap.mark.from_y))
- BWDrawRectangle(w,
- at_x, at_y,
+ BWDrawRectangle(w,
+ at_x, at_y,
at_x + BW->bitmap.mark.to_x - BW->bitmap.mark.from_x,
at_y + BW->bitmap.mark.to_y - BW->bitmap.mark.from_y,
Highlight);
}
-void
+void
BWDragStored(Widget w, Position at_x, Position at_y)
{
BitmapWidget BW = (BitmapWidget) w;
-
+
if (BW->bitmap.storage)
- BWDrawRectangle(w,
+ BWDrawRectangle(w,
at_x, at_y,
at_x + BW->bitmap.storage->width - 1,
at_y + BW->bitmap.storage->height - 1,
Highlight);
}
-static void
-DrawImageData(BitmapWidget BW, XImage *image,
+static void
+DrawImageData(BitmapWidget BW, XImage *image,
Position at_x, Position at_y, int value)
{
Position x, y;
@@ -1256,7 +1264,7 @@ DrawImageData(BitmapWidget BW, XImage *image,
I = value == Invert;
H = value == Highlight;
- for (x = 0; x < image->width; x++)
+ for (x = 0; x < image->width; x++)
for (y = 0; y < image->height; y++) {
A = GetBit(image, x, y);
B = GetBit(BW->bitmap.image, at_x + x, at_y + y);
@@ -1264,24 +1272,24 @@ DrawImageData(BitmapWidget BW, XImage *image,
value = (A & H) ? Highlight : Set;
else
value = Clear;
- BWDrawPoint((Widget) BW,
- at_x + x, at_y + y,
+ BWDrawPoint((Widget) BW,
+ at_x + x, at_y + y,
value);
}
}
-void
+void
BWRestore(Widget w, Position at_x, Position at_y, int value)
{
BitmapWidget BW = (BitmapWidget) w;
-
+
if (BW->bitmap.storage) {
DrawImageData(BW, BW->bitmap.storage, at_x, at_y, value);
/*DestroyBitmapImage(&BW->bitmap.storage);*/
}
}
-void
+void
BWCopy(Widget w, Position at_x, Position at_y, int value)
{
BitmapWidget BW = (BitmapWidget) w;
@@ -1293,7 +1301,7 @@ BWCopy(Widget w, Position at_x, Position at_y, int value)
width = BW->bitmap.mark.to_x - BW->bitmap.mark.from_x + 1;
height = BW->bitmap.mark.to_y - BW->bitmap.mark.from_y + 1;
-
+
storage_data = CreateCleanData(Length(width, height));
storage = CreateBitmapImage(BW, storage_data, width, height);
@@ -1311,7 +1319,7 @@ BWCopy(Widget w, Position at_x, Position at_y, int value)
/* void BWMark(); */
-void
+void
BWMove(Widget w, Position at_x, Position at_y, int value)
{
BitmapWidget BW = (BitmapWidget) w;
@@ -1323,7 +1331,7 @@ BWMove(Widget w, Position at_x, Position at_y, int value)
width = BW->bitmap.mark.to_x - BW->bitmap.mark.from_x + 1;
height = BW->bitmap.mark.to_y - BW->bitmap.mark.from_y + 1;
-
+
storage_data = CreateCleanData(Length(width, height));
storage = CreateBitmapImage(BW, storage_data, width, height);
@@ -1348,34 +1356,34 @@ BWMove(Widget w, Position at_x, Position at_y, int value)
}
}
-void
+void
BWRedrawMark(Widget w)
{
BitmapWidget BW = (BitmapWidget) w;
-
- if (QuerySet(BW->bitmap.mark.from_x, BW->bitmap.mark.from_y))
+
+ if (QuerySet(BW->bitmap.mark.from_x, BW->bitmap.mark.from_y))
XFillRectangle(XtDisplay(BW), XtWindow(BW), BW->bitmap.highlighting_gc,
- InWindowX(BW, BW->bitmap.mark.from_x),
- InWindowY(BW, BW->bitmap.mark.from_y),
- InWindowX(BW, BW->bitmap.mark.to_x + 1) -
+ InWindowX(BW, BW->bitmap.mark.from_x),
+ InWindowY(BW, BW->bitmap.mark.from_y),
+ InWindowX(BW, BW->bitmap.mark.to_x + 1) -
InWindowX(BW, BW->bitmap.mark.from_x),
InWindowY(BW, BW->bitmap.mark.to_y + 1) -
InWindowY(BW, BW->bitmap.mark.from_y));
}
-void
+void
BWStoreToBuffer(Widget w)
{
BitmapWidget BW = (BitmapWidget) w;
-
- memmove( BW->bitmap.buffer->data, BW->bitmap.image->data,
+
+ memmove( BW->bitmap.buffer->data, BW->bitmap.image->data,
Length(BW->bitmap.image->width, BW->bitmap.image->height));
BW->bitmap.buffer_hot = BW->bitmap.hot;
BW->bitmap.buffer_mark = BW->bitmap.mark;
}
-void
+void
BWUnmark(Widget w)
{
BitmapWidget BW = (BitmapWidget) w;
@@ -1384,26 +1392,26 @@ BWUnmark(Widget w)
if (QuerySet(BW->bitmap.mark.from_x, BW->bitmap.mark.from_y)) {
XFillRectangle(XtDisplay(BW), XtWindow(BW), BW->bitmap.highlighting_gc,
- InWindowX(BW, BW->bitmap.mark.from_x),
- InWindowY(BW, BW->bitmap.mark.from_y),
- InWindowX(BW, BW->bitmap.mark.to_x + 1) -
+ InWindowX(BW, BW->bitmap.mark.from_x),
+ InWindowY(BW, BW->bitmap.mark.from_y),
+ InWindowX(BW, BW->bitmap.mark.to_x + 1) -
InWindowX(BW, BW->bitmap.mark.from_x),
InWindowY(BW, BW->bitmap.mark.to_y + 1) -
InWindowY(BW, BW->bitmap.mark.from_y));
-
+
BW->bitmap.mark.from_x = BW->bitmap.mark.from_y = NotSet;
BW->bitmap.mark.to_x = BW->bitmap.mark.to_y = NotSet;
}
}
-void
-BWMark(Widget w, Position from_x, Position from_y,
+void
+BWMark(Widget w, Position from_x, Position from_y,
Position to_x, Position to_y)
{
BitmapWidget BW = (BitmapWidget) w;
BWUnmark(w);
-
+
if (QuerySet(from_x, from_y)) {
if ((from_x == to_x) && (from_y == to_y)) {
/*
@@ -1421,24 +1429,24 @@ BWMark(Widget w, Position from_x, Position from_y,
from_y = max(0, from_y);
to_x = min(BW->bitmap.image->width - 1, to_x);
to_y = min(BW->bitmap.image->height - 1, to_y);
-
+
BW->bitmap.mark.from_x = from_x;
BW->bitmap.mark.from_y = from_y;
BW->bitmap.mark.to_x = to_x;
BW->bitmap.mark.to_y = to_y;
}
-
+
XFillRectangle(XtDisplay(BW), XtWindow(BW), BW->bitmap.highlighting_gc,
InWindowX(BW, BW->bitmap.mark.from_x),
- InWindowY(BW, BW->bitmap.mark.from_y),
+ InWindowY(BW, BW->bitmap.mark.from_y),
InWindowX(BW, BW->bitmap.mark.to_x + 1) -
InWindowX(BW, BW->bitmap.mark.from_x),
- InWindowY(BW, BW->bitmap.mark.to_y +1) -
+ InWindowY(BW, BW->bitmap.mark.to_y +1) -
InWindowY(BW, BW->bitmap.mark.from_y));
}
}
-void
+void
BWMarkAll(Widget w)
{
BitmapWidget BW = (BitmapWidget) w;
@@ -1446,7 +1454,7 @@ BWMarkAll(Widget w)
BWMark(w, 0, 0, BW->bitmap.image->width - 1, BW->bitmap.image->height - 1);
}
-void
+void
BWUndo(Widget w)
{
BitmapWidget BW = (BitmapWidget) w;
@@ -1454,21 +1462,21 @@ BWUndo(Widget w)
char *tmp_data;
XPoint tmp_hot;
BWArea tmp_mark;
-
+
tmp_data = BW->bitmap.image->data;
BW->bitmap.image->data = BW->bitmap.buffer->data;
BW->bitmap.buffer->data = tmp_data;
tmp_hot = BW->bitmap.hot;
tmp_mark = BW->bitmap.mark;
-
+
for (x = 0; x < BW->bitmap.image->width; x++)
for (y = 0; y < BW->bitmap.image->height; y++)
if (GetBit(BW->bitmap.image, x, y) != GetBit(BW->bitmap.buffer, x, y))
DrawSquare(BW, x, y);
BWSetHotSpot(w, BW->bitmap.buffer_hot.x, BW->bitmap.buffer_hot.y);
-/*
+/*
BWMark(w, BW->bitmap.buffer_mark.from_x, BW->bitmap.buffer_mark.from_y,
BW->bitmap.buffer_mark.to_x, BW->bitmap.buffer_mark.to_y);
*/
@@ -1477,21 +1485,21 @@ BWUndo(Widget w)
}
-void
+void
BWHighlightAxes(Widget w)
{
BitmapWidget BW = (BitmapWidget) w;
XDrawLine(XtDisplay(BW), XtWindow(BW),
BW->bitmap.axes_gc,
- InWindowX(BW, 0),
+ InWindowX(BW, 0),
InWindowY(BW, 0),
InWindowX(BW, BW->bitmap.width),
InWindowY(BW, BW->bitmap.height));
XDrawLine(XtDisplay(BW), XtWindow(BW),
BW->bitmap.axes_gc,
InWindowX(BW, BW->bitmap.width),
- InWindowY(BW, 0),
+ InWindowY(BW, 0),
InWindowX(BW, 0),
InWindowY(BW, BW->bitmap.height));
XDrawLine(XtDisplay(BW), XtWindow(BW),
@@ -1507,19 +1515,19 @@ BWHighlightAxes(Widget w)
InWindowX(BW, (float)BW->bitmap.width / 2.0),
InWindowY(BW, BW->bitmap.height));
}
-
+
typedef struct {
Position *x, *y;
Dimension *width, *height;
} Table;
XImage *
-ScaleBitmapImage(BitmapWidget BW, XImage *src,
+ScaleBitmapImage(BitmapWidget BW, XImage *src,
double scale_x, double scale_y)
{
char *data;
XImage *dst;
- Table table;
+ Table table;
Position x, y, w, h;
Dimension width, height;
bit pixel;
@@ -1541,7 +1549,7 @@ ScaleBitmapImage(BitmapWidget BW, XImage *src,
table.y = (Position *) XtMalloc(sizeof(Position) * src->height);
table.width = (Dimension *) XtMalloc(sizeof(Dimension) * src->width);
table.height = (Dimension *) XtMalloc(sizeof(Dimension) * src->height);
-
+
for (x = 0; x < src->width; x++) {
table.x[x] = rint(scale_x * x);
table.width[x] = rint(scale_x * (x + 1)) - rint(scale_x * x);
@@ -1550,14 +1558,14 @@ ScaleBitmapImage(BitmapWidget BW, XImage *src,
table.y[y] = rint(scale_y * y);
table.height[y] = rint(scale_y * (y + 1)) - rint(scale_y * y);
}
-
+
for (x = 0; x < src->width; x++)
for (y = 0; y < src->height; y++) {
pixel = GetBit(src, x, y);
for (w = 0; (int)w < (int)table.width[x]; w++)
for (h = 0; (int)h < (int)table.height[y]; h++)
- if (pixel) SetBit(dst,
- table.x[x] + w,
+ if (pixel) SetBit(dst,
+ table.x[x] + w,
table.y[y] + h);
}
@@ -1566,7 +1574,7 @@ ScaleBitmapImage(BitmapWidget BW, XImage *src,
XtFree((char *)table.width);
XtFree((char *)table.height);
}
-
+
return (dst);
}
diff --git a/app/bitmap/Handlers.c b/app/bitmap/Handlers.c
index 9137e0fb7..476345136 100644
--- a/app/bitmap/Handlers.c
+++ b/app/bitmap/Handlers.c
@@ -33,7 +33,7 @@ from The Open Group.
#include <X11/IntrinsicP.h>
#include <X11/StringDefs.h>
#include "BitmapP.h"
-
+
#include <stdio.h>
#include <math.h>
@@ -52,10 +52,10 @@ from The Open Group.
(InBitmapY(BW, y) == (square_y)))
-static void
-DragOnePointHandler(Widget w,
- XtPointer client_data,
- XEvent *event,
+static void
+DragOnePointHandler(Widget w,
+ XtPointer client_data,
+ XEvent *event,
Boolean *cont) /* ARGSUSED */
{
BWStatus *status = (BWStatus *)client_data;
@@ -65,7 +65,7 @@ DragOnePointHandler(Widget w,
fprintf(stderr, "D1PH ");
switch (event->type) {
-
+
case ButtonPress:
if (event->xbutton.state != status->state) return;
if (!QuerySet(status->at_x, status->at_y)) {
@@ -80,7 +80,7 @@ DragOnePointHandler(Widget w,
status->at_x, status->at_y, status->value);
}
break;
-
+
case ButtonRelease:
if (QuerySet(status->at_x, status->at_y)) {
status->value = Value(BW, event->xbutton.button);
@@ -89,7 +89,7 @@ DragOnePointHandler(Widget w,
status->at_y = InBitmapY(BW, event->xbutton.y);
status->success = status->draw ? True : False;
/* SUPPRESS 701 */
- BWTerminateRequest(w, TRUE);
+ BWTerminateRequest(w, TRUE);
}
break;
@@ -109,56 +109,56 @@ DragOnePointHandler(Widget w,
}
}
-void
-DragOnePointEngage(Widget w,
- BWStatus *status,
- XtPointer draw,
+void
+DragOnePointEngage(Widget w,
+ BWStatus *status,
+ XtPointer draw,
int *state)
{
-
+
status->at_x = NotSet;
status->at_y = NotSet;
status->draw = draw;
status->success = False;
status->state = *state;
-
+
XtAddEventHandler(w,
ButtonPressMask | ButtonReleaseMask | PointerMotionMask,
FALSE, DragOnePointHandler, (XtPointer)status);
}
/* ARGSUSED */
-void
-DragOnePointTerminate(Widget w,
- BWStatus *status,
+void
+DragOnePointTerminate(Widget w,
+ BWStatus *status,
XtPointer draw)
{
-
+
if (status->success) {
BWChangeNotify(w);
BWSetChanged(w);
}
-
+
XtRemoveEventHandler(w,
ButtonPressMask | ButtonReleaseMask | PointerMotionMask,
FALSE, DragOnePointHandler, (XtPointer)status);
-
+
}
-void
-OnePointHandler(Widget w,
- XtPointer client_data,
- XEvent *event,
+void
+OnePointHandler(Widget w,
+ XtPointer client_data,
+ XEvent *event,
Boolean *cont) /* ARGSUSED */
{
BWStatus *status = (BWStatus *)client_data;
BitmapWidget BW = (BitmapWidget) w;
-
+
if (DEBUG)
fprintf(stderr, "1PH ");
switch (event->type) {
-
+
case Expose:
if (QuerySet(status->at_x, status->at_y)) {
BWClip(w, event->xexpose.x, event->xexpose.y,
@@ -166,11 +166,11 @@ OnePointHandler(Widget w,
if (status->draw)
(*(DrawOnePointProc)status->draw)(w,
status->at_x, status->at_y, Highlight);
-
+
BWUnclip(w);
}
break;
-
+
case ButtonPress:
if (event->xbutton.state != status->state) return;
if (!QuerySet(status->at_x, status->at_y)) {
@@ -183,23 +183,23 @@ OnePointHandler(Widget w,
status->at_x, status->at_y, Highlight);
}
break;
-
+
case ButtonRelease:
if (QuerySet(status->at_x, status->at_y)) {
if (status->draw)
(*(DrawOnePointProc)status->draw)(w,
status->at_x, status->at_y, Highlight);
-
+
status->value = Value(BW, event->xbutton.button);
status->btime = event->xbutton.time;
status->at_x = InBitmapX(BW, event->xbutton.x);
status->at_y = InBitmapY(BW, event->xbutton.y);
status->success = True;
-
+
BWTerminateRequest(w, TRUE);
}
break;
-
+
case MotionNotify:
if (QuerySet(status->at_x, status->at_y)) {
if (!QueryInSquare(BW, event->xmotion.x, event->xmotion.y,
@@ -213,15 +213,15 @@ OnePointHandler(Widget w,
(*(DrawOnePointProc)status->draw)(w,
status->at_x, status->at_y, Highlight);
}
- }
+ }
break;
}
}
-void
-OnePointEngage(Widget w,
- BWStatus *status,
- XtPointer draw,
+void
+OnePointEngage(Widget w,
+ BWStatus *status,
+ XtPointer draw,
int *state)
{
status->at_x = NotSet;
@@ -231,16 +231,16 @@ OnePointEngage(Widget w,
status->state = *state;
XtAddEventHandler(w,
- ButtonPressMask | ButtonReleaseMask |
+ ButtonPressMask | ButtonReleaseMask |
ExposureMask | PointerMotionMask,
FALSE, OnePointHandler, (XtPointer)status);
}
#if 0
-void
-OnePointImmediateEngage(Widget w,
- BWStatus *status,
- XtPointer draw,
+void
+OnePointImmediateEngage(Widget w,
+ BWStatus *status,
+ XtPointer draw,
int *state)
{
status->at_x = 0;
@@ -248,24 +248,24 @@ OnePointImmediateEngage(Widget w,
status->draw = draw;
status->success = False;
status->state = *state;
-
+
if (status->draw)
(*(DrawOnePointProc)status->draw)(w,
status->at_x, status->at_y, Highlight);
-
+
XtAddEventHandler(w,
- ButtonPressMask | ButtonReleaseMask |
+ ButtonPressMask | ButtonReleaseMask |
ExposureMask | PointerMotionMask,
FALSE, OnePointHandler, (XtPointer)status);
}
#endif
-void
-OnePointTerminate(Widget w,
- BWStatus *status,
+void
+OnePointTerminate(Widget w,
+ BWStatus *status,
XtPointer draw)
{
-
+
if (status->success && draw) {
BWStoreToBuffer(w);
(*(DrawOnePointProc)draw)(w,
@@ -273,25 +273,25 @@ OnePointTerminate(Widget w,
status->value);
BWChangeNotify(w);
BWSetChanged(w);
- }
+ }
else
if (QuerySet(status->at_x, status->at_y))
if (status->draw)
(*(DrawOnePointProc)status->draw)(w,
status->at_x, status->at_y, Highlight);
-
+
XtRemoveEventHandler(w,
- ButtonPressMask | ButtonReleaseMask |
+ ButtonPressMask | ButtonReleaseMask |
ExposureMask | PointerMotionMask,
FALSE, OnePointHandler, (XtPointer)status);
}
-void
-OnePointTerminateTransparent(Widget w,
- BWStatus *status,
+void
+OnePointTerminateTransparent(Widget w,
+ BWStatus *status,
XtPointer draw)
{
-
+
if (status->success && draw)
(*(DrawOnePointProc)draw)(w,
status->at_x, status->at_y,
@@ -301,41 +301,41 @@ OnePointTerminateTransparent(Widget w,
if (status->draw)
(*(DrawOnePointProc)status->draw)(w,
status->at_x, status->at_y, Highlight);
-
+
XtRemoveEventHandler(w,
- ButtonPressMask | ButtonReleaseMask |
+ ButtonPressMask | ButtonReleaseMask |
ExposureMask | PointerMotionMask,
FALSE, OnePointHandler, (XtPointer)status);
-
+
}
-void
-TwoPointsHandler(Widget w,
- XtPointer client_data,
- XEvent *event,
+void
+TwoPointsHandler(Widget w,
+ XtPointer client_data,
+ XEvent *event,
Boolean *cont) /* ARGSUSED */
{
BitmapWidget BW = (BitmapWidget) w;
BWStatus *status = (BWStatus *)client_data;
if (DEBUG)
fprintf(stderr, "2PH ");
-
+
switch (event->type) {
-
+
case Expose:
- if (QuerySet(status->from_x, status->from_y) &&
+ if (QuerySet(status->from_x, status->from_y) &&
QuerySet(status->to_x, status->to_y)) {
BWClip(w, event->xexpose.x, event->xexpose.y,
event->xexpose.width, event->xexpose.height);
if (status->draw)
(*(DrawTwoPointProc)status->draw)(w,
- status->from_x, status->from_y,
+ status->from_x, status->from_y,
status->to_x, status->to_y, Highlight);
BWUnclip(w);
}
break;
-
+
case ButtonPress:
if (event->xbutton.state != status->state) return;
if (!QuerySet(status->from_x, status->from_y)) {
@@ -347,27 +347,27 @@ TwoPointsHandler(Widget w,
status->to_y = InBitmapY(BW, event->xbutton.y);
if (status->draw)
(*(DrawTwoPointProc)status->draw)(w,
- status->from_x, status->from_y,
+ status->from_x, status->from_y,
status->to_x, status->to_y, Highlight);
}
break;
-
+
case ButtonRelease:
if (QuerySet(status->from_x, status->from_y)) {
if (status->draw)
(*(DrawTwoPointProc)status->draw)(w,
- status->from_x, status->from_y,
+ status->from_x, status->from_y,
status->to_x, status->to_y, Highlight);
status->value = Value(BW, event->xbutton.button);
- status->btime = event->xbutton.time;
+ status->btime = event->xbutton.time;
status->to_x = InBitmapX(BW, event->xbutton.x);
status->to_y = InBitmapY(BW, event->xbutton.y);
status->success = True;
-
+
BWTerminateRequest(w, TRUE);
}
break;
-
+
case MotionNotify:
if (QuerySet(status->from_x, status->from_y)) {
if (QuerySet(status->to_x, status->to_y)) {
@@ -375,13 +375,13 @@ TwoPointsHandler(Widget w,
status->to_x, status->to_y)) {
if (status->draw)
(*(DrawTwoPointProc)status->draw)(w,
- status->from_x, status->from_y,
+ status->from_x, status->from_y,
status->to_x, status->to_y, Highlight);
status->to_x = InBitmapX(BW, event->xmotion.x);
status->to_y = InBitmapY(BW, event->xmotion.y);
if (status->draw)
(*(DrawTwoPointProc)status->draw)(w,
- status->from_x, status->from_y,
+ status->from_x, status->from_y,
status->to_x, status->to_y, Highlight);
}
}
@@ -390,7 +390,7 @@ TwoPointsHandler(Widget w,
status->to_y = InBitmapY(BW, event->xmotion.y);
if (status->draw)
(*(DrawTwoPointProc)status->draw)(w,
- status->from_x, status->from_y,
+ status->from_x, status->from_y,
status->to_x, status->to_y, Highlight);
}
}
@@ -398,13 +398,13 @@ TwoPointsHandler(Widget w,
}
}
-void
-TwoPointsEngage(Widget w,
- BWStatus *status,
- XtPointer draw,
+void
+TwoPointsEngage(Widget w,
+ BWStatus *status,
+ XtPointer draw,
int *state)
{
-
+
status->from_x = NotSet;
status->from_y = NotSet;
status->to_x = NotSet;
@@ -414,17 +414,17 @@ TwoPointsEngage(Widget w,
status->state = *state;
XtAddEventHandler(w,
- ButtonPressMask | ButtonReleaseMask |
+ ButtonPressMask | ButtonReleaseMask |
ExposureMask | PointerMotionMask,
FALSE, TwoPointsHandler, (XtPointer)status);
}
-void
-TwoPointsTerminate(Widget w,
- BWStatus *status,
+void
+TwoPointsTerminate(Widget w,
+ BWStatus *status,
XtPointer draw)
{
-
+
if (status->success && draw) {
BWStoreToBuffer(w);
(*(DrawTwoPointProc)draw)(w,
@@ -435,126 +435,126 @@ TwoPointsTerminate(Widget w,
BWSetChanged(w);
}
else
- if (QuerySet(status->from_x, status->from_y) &&
+ if (QuerySet(status->from_x, status->from_y) &&
QuerySet(status->to_x, status->to_y))
if (status->draw)
(*(DrawTwoPointProc)status->draw)(w,
- status->from_x, status->from_y,
+ status->from_x, status->from_y,
status->to_x, status->to_y, Highlight);
-
+
XtRemoveEventHandler(w,
- ButtonPressMask | ButtonReleaseMask |
+ ButtonPressMask | ButtonReleaseMask |
ExposureMask | PointerMotionMask,
FALSE, TwoPointsHandler, (XtPointer)status);
}
-void
-TwoPointsTerminateTransparent(Widget w,
- BWStatus *status,
+void
+TwoPointsTerminateTransparent(Widget w,
+ BWStatus *status,
XtPointer draw)
{
-
+
if (status->success && draw)
(*(DrawTwoPointProc)draw)(w,
status->from_x, status->from_y,
status->to_x, status->to_y,
status->value);
else
- if (QuerySet(status->from_x, status->from_y) &&
+ if (QuerySet(status->from_x, status->from_y) &&
QuerySet(status->to_x, status->to_y))
if (status->draw)
(*(DrawTwoPointProc)status->draw)(w,
- status->from_x, status->from_y,
+ status->from_x, status->from_y,
status->to_x, status->to_y, Highlight);
-
+
XtRemoveEventHandler(w,
- ButtonPressMask | ButtonReleaseMask |
+ ButtonPressMask | ButtonReleaseMask |
ExposureMask | PointerMotionMask,
FALSE, TwoPointsHandler, (XtPointer)status);
}
-void
-TwoPointsTerminateTimed(Widget w,
- BWStatus *status,
+void
+TwoPointsTerminateTimed(Widget w,
+ BWStatus *status,
XtPointer draw)
{
-
+
if (status->success && draw)
(*(DrawTwoPointProc)draw)(w,
status->from_x, status->from_y,
status->to_x, status->to_y,
status->btime);
else
- if (QuerySet(status->from_x, status->from_y) &&
+ if (QuerySet(status->from_x, status->from_y) &&
QuerySet(status->to_x, status->to_y))
if (status->draw)
(*(DrawTwoPointProc)status->draw)(w,
- status->from_x, status->from_y,
+ status->from_x, status->from_y,
status->to_x, status->to_y, Highlight);
-
+
XtRemoveEventHandler(w,
- ButtonPressMask | ButtonReleaseMask |
+ ButtonPressMask | ButtonReleaseMask |
ExposureMask | PointerMotionMask,
FALSE, TwoPointsHandler, (XtPointer)status);
}
/* ARGSUSED */
-void
-Interface(Widget w,
- BWStatus *status,
+void
+Interface(Widget w,
+ BWStatus *status,
XtPointer action)
{
(*(InterfaceProc)action)(w);
}
-void
-Paste(Widget w,
- Position at_x,
- Position at_y,
+void
+Paste(Widget w,
+ Position at_x,
+ Position at_y,
int value)
{
BitmapWidget BW = (BitmapWidget) w;
BWStatus *my_status;
BWRequest request;
- my_status = (BWStatus *)
+ my_status = (BWStatus *)
BW->bitmap.request_stack[BW->bitmap.current].status;
my_status->draw = NULL;
request = (BWRequest)
BW->bitmap.request_stack[BW->bitmap.current].request->terminate_client_data;
-
+
BWTerminateRequest(w, FALSE);
-
+
if ((at_x == max(BW->bitmap.mark.from_x, min(at_x, BW->bitmap.mark.to_x)))
&&
(at_y == max(BW->bitmap.mark.from_y, min(at_y, BW->bitmap.mark.to_y)))) {
-
+
BWStatus *status;
-
+
if (DEBUG)
fprintf(stderr, "Prepaste request: %s\n", request);
-
+
BWEngageRequest(w, request, False, (char *)&(my_status->state), sizeof(int));
-
- status = (BWStatus *)
+
+ status = (BWStatus *)
BW->bitmap.request_stack[BW->bitmap.current].status;
-
+
status->at_x = at_x;
status->at_y = at_y;
status->value = value;
- (*(DrawOnePointProc)status->draw) (w, at_x, at_y, Highlight);
+ (*(DrawOnePointProc)status->draw) (w, at_x, at_y, Highlight);
}
else {
BWStatus *status;
-
+
BWEngageRequest(w, MarkRequest, False, (char *)&(my_status->state), sizeof(int));
-
- status = (BWStatus *)
+
+ status = (BWStatus *)
BW->bitmap.request_stack[BW->bitmap.current].status;
-
+
status->from_x = status->to_x = at_x;
status->from_y = status->to_y = at_y;
status->value = value;
@@ -563,10 +563,10 @@ Paste(Widget w,
}
-void
-DragTwoPointsHandler(Widget w,
- XtPointer client_data,
- XEvent *event,
+void
+DragTwoPointsHandler(Widget w,
+ XtPointer client_data,
+ XEvent *event,
Boolean *cont) /* ARGSUSED */
{
BitmapWidget BW = (BitmapWidget) w;
@@ -576,7 +576,7 @@ DragTwoPointsHandler(Widget w,
fprintf(stderr, "D2PH ");
switch (event->type) {
-
+
case ButtonPress:
if (event->xbutton.state != status->state) return;
if (!QuerySet(status->from_x, status->from_y)) {
@@ -590,25 +590,25 @@ DragTwoPointsHandler(Widget w,
status->success = status->draw ? True : False;
if (status->draw)
(*(DrawTwoPointProc)status->draw)(w,
- status->from_x, status->from_y,
+ status->from_x, status->from_y,
status->to_x, status->to_y, status->value);
}
break;
-
+
case ButtonRelease:
if (QuerySet(status->from_x, status->from_y)) {
status->value = Value(BW, event->xbutton.button);
- status->btime = event->xbutton.time;
+ status->btime = event->xbutton.time;
status->from_x = status->to_x;
status->from_y = status->to_y;
status->to_x = InBitmapX(BW, event->xbutton.x);
status->to_y = InBitmapY(BW, event->xbutton.y);
status->success = True;
-
+
BWTerminateRequest(w, TRUE);
}
break;
-
+
case MotionNotify:
if (QuerySet(status->from_x, status->from_y)) {
if (QuerySet(status->to_x, status->to_y)) {
@@ -620,7 +620,7 @@ DragTwoPointsHandler(Widget w,
status->to_y = InBitmapY(BW, event->xmotion.y);
if (status->draw)
(*(DrawTwoPointProc)status->draw)(w,
- status->from_x, status->from_y,
+ status->from_x, status->from_y,
status->to_x, status->to_y, status->value);
}
}
@@ -629,13 +629,13 @@ DragTwoPointsHandler(Widget w,
}
}
-void
-DragTwoPointsEngage(Widget w,
- BWStatus *status,
- XtPointer draw,
+void
+DragTwoPointsEngage(Widget w,
+ BWStatus *status,
+ XtPointer draw,
int *state)
{
-
+
status->from_x = NotSet;
status->from_y = NotSet;
status->to_x = NotSet;
@@ -649,15 +649,15 @@ DragTwoPointsEngage(Widget w,
FALSE, DragTwoPointsHandler, (XtPointer)status);
}
-void
-DragTwoPointsTerminate(Widget w,
- BWStatus *status,
+void
+DragTwoPointsTerminate(Widget w,
+ BWStatus *status,
XtPointer draw)
{
-
+
if (status->success && draw) {
- if ((status->from_x != status->to_x)
- ||
+ if ((status->from_x != status->to_x)
+ ||
(status->from_y != status->to_y))
(*(DrawTwoPointProc)draw)(w,
status->from_x, status->from_y,
@@ -666,7 +666,7 @@ DragTwoPointsTerminate(Widget w,
BWChangeNotify(w);
BWSetChanged(w);
}
-
+
XtRemoveEventHandler(w,
ButtonPressMask | ButtonReleaseMask | PointerMotionMask,
FALSE, DragTwoPointsHandler, (XtPointer)status);
diff --git a/app/bitmap/Makefile.am b/app/bitmap/Makefile.am
index 98d7c724b..88cc61165 100644
--- a/app/bitmap/Makefile.am
+++ b/app/bitmap/Makefile.am
@@ -1,6 +1,6 @@
-#
+#
# Copyright 2005 Red Hat, Inc.
-#
+#
# Permission to use, copy, modify, distribute, and sell this software and its
# documentation for any purpose is hereby granted without fee, provided that
# the above copyright notice appear in all copies and that both that
@@ -10,7 +10,7 @@
# specific, written prior permission. Red Hat makes no
# representations about the suitability of this software for any purpose. It
# is provided "as is" without express or implied warranty.
-#
+#
# RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
# EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
@@ -23,7 +23,7 @@ SUBDIRS=man
bin_PROGRAMS = bitmap bmtoa atobm
bitmap_CFLAGS = $(CWARNFLAGS) $(BITMAP_CFLAGS)
-bitmap_LDADD = $(BITMAP_LIBS) -lm
+bitmap_LDADD = $(BITMAP_LIBS) $(MATH_LIBS)
bitmap_SOURCES = \
BitEdit.c \
CutPaste.c \
@@ -42,7 +42,7 @@ bmtoa_LDADD = $(BMTOA_LIBS)
bmtoa_SOURCES = bmtoa.c
atobm_CFLAGS = $(CWARNFLAGS) $(ATOBM_CFLAGS)
-atobm_LDADD = $(ATOBM_LDADD)
+atobm_LDADD = $(ATOBM_LIBS)
atobm_SOURCES = atobm.c
EXTRA_DIST = autogen.sh
diff --git a/app/bitmap/Makefile.in b/app/bitmap/Makefile.in
index 8c7369b83..b3f715b85 100644
--- a/app/bitmap/Makefile.in
+++ b/app/bitmap/Makefile.in
@@ -14,9 +14,9 @@
@SET_MAKE@
-#
+#
# Copyright 2005 Red Hat, Inc.
-#
+#
# Permission to use, copy, modify, distribute, and sell this software and its
# documentation for any purpose is hereby granted without fee, provided that
# the above copyright notice appear in all copies and that both that
@@ -26,7 +26,7 @@
# specific, written prior permission. Red Hat makes no
# representations about the suitability of this software for any purpose. It
# is provided "as is" without express or implied warranty.
-#
+#
# RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
# EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
@@ -45,9 +45,9 @@ pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = .
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
+install_sh_DATA = ${SHELL} $(install_sh) -c -m 644
+install_sh_PROGRAM = ${SHELL} $(install_sh) -c
+install_sh_SCRIPT = ${SHELL} $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
@@ -80,14 +80,14 @@ binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
PROGRAMS = $(bin_PROGRAMS)
am_atobm_OBJECTS = atobm-atobm.$(OBJEXT)
atobm_OBJECTS = $(am_atobm_OBJECTS)
-atobm_DEPENDENCIES =
+am__DEPENDENCIES_1 =
+atobm_DEPENDENCIES = $(am__DEPENDENCIES_1)
am_bitmap_OBJECTS = bitmap-BitEdit.$(OBJEXT) bitmap-CutPaste.$(OBJEXT) \
bitmap-Graphics.$(OBJEXT) bitmap-ReqMach.$(OBJEXT) \
bitmap-Bitmap.$(OBJEXT) bitmap-Dialog.$(OBJEXT) \
bitmap-Handlers.$(OBJEXT)
bitmap_OBJECTS = $(am_bitmap_OBJECTS)
-am__DEPENDENCIES_1 =
-bitmap_DEPENDENCIES = $(am__DEPENDENCIES_1)
+bitmap_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
am_bmtoa_OBJECTS = bmtoa-bmtoa.$(OBJEXT)
bmtoa_OBJECTS = $(am_bmtoa_OBJECTS)
bmtoa_DEPENDENCIES = $(am__DEPENDENCIES_1)
@@ -146,6 +146,7 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BASE_CFLAGS = @BASE_CFLAGS@
BITMAP_CFLAGS = @BITMAP_CFLAGS@
BITMAP_LIBS = @BITMAP_LIBS@
BMTOA_CFLAGS = @BMTOA_CFLAGS@
@@ -186,6 +187,7 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
MAN_SUBSTS = @MAN_SUBSTS@
+MATH_LIBS = @MATH_LIBS@
MISC_MAN_DIR = @MISC_MAN_DIR@
MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
OBJEXT = @OBJEXT@
@@ -200,6 +202,7 @@ PKG_CONFIG = @PKG_CONFIG@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
+STRICT_CFLAGS = @STRICT_CFLAGS@
STRIP = @STRIP@
VERSION = @VERSION@
XORG_MAN_PAGE = @XORG_MAN_PAGE@
@@ -249,7 +252,7 @@ sysconfdir = @sysconfdir@
target_alias = @target_alias@
SUBDIRS = man
bitmap_CFLAGS = $(CWARNFLAGS) $(BITMAP_CFLAGS)
-bitmap_LDADD = $(BITMAP_LIBS) -lm
+bitmap_LDADD = $(BITMAP_LIBS) $(MATH_LIBS)
bitmap_SOURCES = \
BitEdit.c \
CutPaste.c \
@@ -267,7 +270,7 @@ bmtoa_CFLAGS = $(CWARNFLAGS) $(BMTOA_CFLAGS)
bmtoa_LDADD = $(BMTOA_LIBS)
bmtoa_SOURCES = bmtoa.c
atobm_CFLAGS = $(CWARNFLAGS) $(ATOBM_CFLAGS)
-atobm_LDADD = $(ATOBM_LDADD)
+atobm_LDADD = $(ATOBM_LIBS)
atobm_SOURCES = atobm.c
EXTRA_DIST = autogen.sh
bitmapdir = $(includedir)/X11/bitmaps
diff --git a/app/bitmap/ReqMach.c b/app/bitmap/ReqMach.c
index d781b7478..4ba1a768e 100644
--- a/app/bitmap/ReqMach.c
+++ b/app/bitmap/ReqMach.c
@@ -35,13 +35,13 @@ from The Open Group.
#include <X11/Xfuncs.h>
#include <X11/Xos.h>
#include "BitmapP.h"
-
+
#include <stdio.h>
#include <math.h>
/*****************************************************************************\
- * Request Machine: stacks up and handles requests from application calls. *
+ * Request Machine: stacks up and handles requests from application calls. *
\*****************************************************************************/
/*
@@ -56,7 +56,7 @@ FindRequest(BWRequest name)
for (i = 0; i < bitmapClassRec.bitmap_class.num_requests; i++)
if (!strcmp(name, bitmapClassRec.bitmap_class.requests[i].name))
return &bitmapClassRec.bitmap_class.requests[i];
-
+
return NULL;
}
@@ -64,13 +64,13 @@ FindRequest(BWRequest name)
* Adds a request to the request stack and does proper initializations.
* Returns TRUE if the request was found and FALSE otherwise.
*/
-Boolean
-BWAddRequest(Widget w, BWRequest name, Boolean trap,
+Boolean
+BWAddRequest(Widget w, BWRequest name, Boolean trap,
XtPointer call_data, Cardinal call_data_size)
{
BitmapWidget BW = (BitmapWidget) w;
BWRequestRec *request;
-
+
request = FindRequest(name);
if(request) {
if (DEBUG)
@@ -79,15 +79,15 @@ BWAddRequest(Widget w, BWRequest name, Boolean trap,
BW->bitmap.request_stack = (BWRequestStack *)
XtRealloc((char *)BW->bitmap.request_stack,
(++BW->bitmap.cardinal + 1) * sizeof(BWRequestStack));
-
+
BW->bitmap.request_stack[BW->bitmap.cardinal].request = request;
- BW->bitmap.request_stack[BW->bitmap.cardinal].status =
+ BW->bitmap.request_stack[BW->bitmap.cardinal].status =
XtMalloc(request->status_size);
BW->bitmap.request_stack[BW->bitmap.cardinal].trap = trap;
- BW->bitmap.request_stack[BW->bitmap.cardinal].call_data =
+ BW->bitmap.request_stack[BW->bitmap.cardinal].call_data =
XtMalloc(call_data_size);
memmove( BW->bitmap.request_stack[BW->bitmap.cardinal].call_data,
- call_data,
+ call_data,
call_data_size);
return True;
@@ -102,15 +102,15 @@ BWAddRequest(Widget w, BWRequest name, Boolean trap,
* Engages the request designated by the current parameter.
* Returnes TRUE if the request has an engage function and FALSE otherwise.
*/
-static Boolean
+static Boolean
Engage(BitmapWidget BW, Cardinal current)
{
BW->bitmap.current = current;
-
+
if (DEBUG)
- fprintf(stderr, "Request: %s\n",
+ fprintf(stderr, "Request: %s\n",
BW->bitmap.request_stack[current].request->name);
-
+
if (BW->bitmap.request_stack[current].request->engage) {
(*BW->bitmap.request_stack[current].request->engage)
((Widget) BW,
@@ -127,17 +127,17 @@ Engage(BitmapWidget BW, Cardinal current)
Boolean BWRemoveRequest(); */
/*
- * Scans down the request stack removing all requests untill it finds
+ * Scans down the request stack removing all requests untill it finds
* one to be trapped.
*/
-static void
+static void
TrappingLoop(BitmapWidget BW)
{
if (DEBUG)
fprintf(stderr, "Scanning... Current: %d\n", BW->bitmap.current);
- if ((BW->bitmap.current > 0)
- &&
+ if ((BW->bitmap.current > 0)
+ &&
(!BW->bitmap.request_stack[BW->bitmap.current--].trap)) {
BWRemoveRequest((Widget) BW);
TrappingLoop(BW);
@@ -154,11 +154,11 @@ TrappingLoop(BitmapWidget BW)
* Terimantes the current request and continues with next request if con = TRUE
* Returnes TRUE if there is any number of requests left on the stack.
*/
-Boolean
+Boolean
BWTerminateRequest(Widget w, Boolean cont)
{
BitmapWidget BW = (BitmapWidget) w;
-
+
if (BW->bitmap.current > 0) {
if (DEBUG)
fprintf(stderr, "Terminating... Current: %d\n", BW->bitmap.current);
@@ -167,7 +167,7 @@ BWTerminateRequest(Widget w, Boolean cont)
(w,
BW->bitmap.request_stack[BW->bitmap.current].status,
BW->bitmap.request_stack[BW->bitmap.current].request->terminate_client_data);
-
+
if (cont) {
if (BW->bitmap.current == BW->bitmap.cardinal)
TrappingLoop(BW);
@@ -181,14 +181,14 @@ BWTerminateRequest(Widget w, Boolean cont)
else
BW->bitmap.current = 0;
}
-
+
return BW->bitmap.current;
}
/*
* Simple interface to BWTerminateRequest that takes only a widget.
*/
-void
+void
BWAbort(Widget w)
{
BWTerminateRequest(w, True);
@@ -199,36 +199,36 @@ BWAbort(Widget w)
* it will terminate it.
* Returns TRUE if the number of requests left on the stack != 0.
*/
-Boolean
+Boolean
BWRemoveRequest(Widget w)
{
BitmapWidget BW = (BitmapWidget) w;
-
+
if (BW->bitmap.cardinal > 0) {
if (DEBUG)
fprintf(stderr, "Removing... Cardinal: %d\n", BW->bitmap.cardinal);
if (BW->bitmap.current == BW->bitmap.cardinal)
BWTerminateRequest(w, False);
-
+
if (BW->bitmap.request_stack[BW->bitmap.cardinal].request->remove)
(*BW->bitmap.request_stack[BW->bitmap.cardinal].request->remove)
(w,
BW->bitmap.request_stack[BW->bitmap.cardinal].status,
BW->bitmap.request_stack[BW->bitmap.cardinal].request->remove_client_data);
-
+
XtFree(BW->bitmap.request_stack[BW->bitmap.cardinal].status);
XtFree(BW->bitmap.request_stack[BW->bitmap.cardinal].call_data);
BW->bitmap.request_stack = (BWRequestStack *)
XtRealloc((char *)BW->bitmap.request_stack,
(--BW->bitmap.cardinal + 1) * sizeof(BWRequestStack));
-
+
return True;
}
- else
+ else
return False;
}
-void
+void
BWRemoveAllRequests(Widget w)
{
while (BWRemoveRequest(w)) {/* removes all requests from the stack */}
@@ -238,19 +238,19 @@ BWRemoveAllRequests(Widget w)
* Adds the request to the stack and performs engaging ritual.
* Returns TRUE if the request was found, FALSE otherwise.
*/
-Boolean
-BWEngageRequest(Widget w, BWRequest name, Boolean trap,
+Boolean
+BWEngageRequest(Widget w, BWRequest name, Boolean trap,
XtPointer call_data, Cardinal call_data_size)
{
BitmapWidget BW = (BitmapWidget) w;
-
+
if (BWAddRequest(w, name, trap, call_data, call_data_size)) {
BWTerminateRequest(w, False);
if (DEBUG)
fprintf(stderr, "Engaging... Cardinal: %d\n", BW->bitmap.cardinal);
if (!Engage(BW, BW->bitmap.cardinal))
BWTerminateRequest(w, True);
-
+
return True;
}
else
diff --git a/app/bitmap/Requests.h b/app/bitmap/Requests.h
index c4457e2d5..111942ffe 100644
--- a/app/bitmap/Requests.h
+++ b/app/bitmap/Requests.h
@@ -69,17 +69,17 @@ extern void BWCopy(Widget w, Position at_x, Position at_y, int value);
extern void BWMove(Widget w, Position at_x, Position at_y, int value);
extern void BWRestore(Widget w, Position at_x, Position at_y, int value);
extern void BWDrawPoint(Widget w, Position x, Position y, bit value);
-extern void BWBlindLine(Widget w, Position from_x, Position from_y,
+extern void BWBlindLine(Widget w, Position from_x, Position from_y,
Position to_x, Position to_y, int value);
extern void BWDrawHotSpot(Widget w, Position x, Position y, int value);
-extern void BWZoomIn(Widget w, Position from_x, Position from_y,
+extern void BWZoomIn(Widget w, Position from_x, Position from_y,
Position to_x, Position to_y);
-extern void OnePointHandler(Widget w, XtPointer client_data,
+extern void OnePointHandler(Widget w, XtPointer client_data,
XEvent *event, Boolean *cont);
-extern void TwoPointsHandler(Widget w, XtPointer client_data,
+extern void TwoPointsHandler(Widget w, XtPointer client_data,
XEvent *event, Boolean *cont);
-extern void DragTwoPointsHandler(Widget w, XtPointer client_data,
+extern void DragTwoPointsHandler(Widget w, XtPointer client_data,
XEvent *event, Boolean *cont);
#endif /* _Requests_h */
diff --git a/app/bitmap/aclocal.m4 b/app/bitmap/aclocal.m4
index 588bc3332..a0beb586e 100644
--- a/app/bitmap/aclocal.m4
+++ b/app/bitmap/aclocal.m4
@@ -498,18 +498,6 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
])
-# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 8
-
-# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
-AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
-
# Do all the work for Automake. -*- Autoconf -*-
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
@@ -1062,7 +1050,7 @@ dnl DEALINGS IN THE SOFTWARE.
# See the "minimum version" comment for each macro you use to see what
# version you require.
m4_defun([XORG_MACROS_VERSION],[
-m4_define([vers_have], [1.11.0])
+m4_define([vers_have], [1.16.2])
m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
m4_if(m4_cmp(maj_have, maj_needed), 0,,
@@ -1089,7 +1077,7 @@ AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}],
# which is not the best choice for supporting other OS'es, but covers most
# of the ones we need for now.
AC_MSG_CHECKING([if $RAWCPP requires -undef])
-AC_LANG_CONFTEST([Does cpp redefine unix ?])
+AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])])
if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
AC_MSG_RESULT([no])
else
@@ -1107,7 +1095,7 @@ fi
rm -f conftest.$ac_ext
AC_MSG_CHECKING([if $RAWCPP requires -traditional])
-AC_LANG_CONFTEST([Does cpp preserve "whitespace"?])
+AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])])
if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then
AC_MSG_RESULT([no])
else
@@ -1457,6 +1445,123 @@ AM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes])
AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes])
]) # XORG_WITH_XMLTO
+# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT])
+# --------------------------------------------
+# Minimum version: 1.12.0
+# Minimum version for optional DEFAULT argument: 1.12.0
+#
+# XSLT (Extensible Stylesheet Language Transformations) is a declarative,
+# XML-based language used for the transformation of XML documents.
+# The xsltproc command line tool is for applying XSLT stylesheets to XML documents.
+# It is used under the cover by xmlto to generate html files from DocBook/XML.
+# The XSLT processor is often used as a standalone tool for transformations.
+# It should not be assumed that this tool is used only to work with documnetation.
+# When DEFAULT is not specified, --with-xsltproc assumes 'auto'.
+#
+# Interface to module:
+# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation
+# XSLTPROC: returns the path of the xsltproc program found
+# returns the path set by the user in the environment
+# --with-xsltproc: 'yes' user instructs the module to use xsltproc
+# 'no' user instructs the module not to use xsltproc
+# have_xsltproc: returns yes if xsltproc found in PATH or no
+#
+# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path.
+#
+AC_DEFUN([XORG_WITH_XSLTPROC],[
+AC_ARG_VAR([XSLTPROC], [Path to xsltproc command])
+# Preserves the interface, should it be implemented later
+m4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])])
+m4_define([_defopt], m4_default([$2], [auto]))
+AC_ARG_WITH(xsltproc,
+ AS_HELP_STRING([--with-xsltproc],
+ [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]),
+ [use_xsltproc=$withval], [use_xsltproc=]_defopt)
+m4_undefine([_defopt])
+
+if test "x$use_xsltproc" = x"auto"; then
+ AC_PATH_PROG([XSLTPROC], [xsltproc])
+ if test "x$XSLTPROC" = "x"; then
+ AC_MSG_WARN([xsltproc not found - cannot transform XML documents])
+ have_xsltproc=no
+ else
+ have_xsltproc=yes
+ fi
+elif test "x$use_xsltproc" = x"yes" ; then
+ AC_PATH_PROG([XSLTPROC], [xsltproc])
+ if test "x$XSLTPROC" = "x"; then
+ AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH])
+ fi
+ have_xsltproc=yes
+elif test "x$use_xsltproc" = x"no" ; then
+ if test "x$XSLTPROC" != "x"; then
+ AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified])
+ fi
+ have_xsltproc=no
+else
+ AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no'])
+fi
+
+AM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes])
+]) # XORG_WITH_XSLTPROC
+
+# XORG_WITH_PERL([MIN-VERSION], [DEFAULT])
+# ----------------------------------------
+# Minimum version: 1.15.0
+#
+# PERL (Practical Extraction and Report Language) is a language optimized for
+# scanning arbitrary text files, extracting information from those text files,
+# and printing reports based on that information.
+#
+# When DEFAULT is not specified, --with-perl assumes 'auto'.
+#
+# Interface to module:
+# HAVE_PERL: used in makefiles to conditionally scan text files
+# PERL: returns the path of the perl program found
+# returns the path set by the user in the environment
+# --with-perl: 'yes' user instructs the module to use perl
+# 'no' user instructs the module not to use perl
+# have_perl: returns yes if perl found in PATH or no
+#
+# If the user sets the value of PERL, AC_PATH_PROG skips testing the path.
+#
+AC_DEFUN([XORG_WITH_PERL],[
+AC_ARG_VAR([PERL], [Path to perl command])
+# Preserves the interface, should it be implemented later
+m4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])])
+m4_define([_defopt], m4_default([$2], [auto]))
+AC_ARG_WITH(perl,
+ AS_HELP_STRING([--with-perl],
+ [Use perl for extracting information from files (default: ]_defopt[)]),
+ [use_perl=$withval], [use_perl=]_defopt)
+m4_undefine([_defopt])
+
+if test "x$use_perl" = x"auto"; then
+ AC_PATH_PROG([PERL], [perl])
+ if test "x$PERL" = "x"; then
+ AC_MSG_WARN([perl not found - cannot extract information and report])
+ have_perl=no
+ else
+ have_perl=yes
+ fi
+elif test "x$use_perl" = x"yes" ; then
+ AC_PATH_PROG([PERL], [perl])
+ if test "x$PERL" = "x"; then
+ AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH])
+ fi
+ have_perl=yes
+elif test "x$use_perl" = x"no" ; then
+ if test "x$PERL" != "x"; then
+ AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified])
+ fi
+ have_perl=no
+else
+ AC_MSG_ERROR([--with-perl expects 'yes' or 'no'])
+fi
+
+AM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes])
+]) # XORG_WITH_PERL
+
# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT])
# ----------------
# Minimum version: 1.5.0
@@ -1702,10 +1807,11 @@ AM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes])
AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes])
]) # XORG_WITH_GROFF
-# XORG_WITH_FOP([DEFAULT])
-# ----------------
+# XORG_WITH_FOP([MIN-VERSION], [DEFAULT])
+# ---------------------------------------
# Minimum version: 1.6.0
# Minimum version for optional DEFAULT argument: 1.11.0
+# Minimum version for optional MIN-VERSION argument: 1.15.0
#
# Documentation tools are not always available on all platforms and sometimes
# not at the appropriate level. This macro enables a module to test for the
@@ -1725,7 +1831,7 @@ AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes])
#
AC_DEFUN([XORG_WITH_FOP],[
AC_ARG_VAR([FOP], [Path to fop command])
-m4_define([_defopt], m4_default([$1], [auto]))
+m4_define([_defopt], m4_default([$2], [auto]))
AC_ARG_WITH(fop,
AS_HELP_STRING([--with-fop],
[Use fop to regenerate documentation (default: ]_defopt[)]),
@@ -1754,6 +1860,22 @@ elif test "x$use_fop" = x"no" ; then
else
AC_MSG_ERROR([--with-fop expects 'yes' or 'no'])
fi
+
+# Test for a minimum version of fop, if provided.
+m4_ifval([$1],
+[if test "$have_fop" = yes; then
+ # scrape the fop version
+ AC_MSG_CHECKING([for fop minimum version])
+ fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3`
+ AC_MSG_RESULT([$fop_version])
+ AS_VERSION_COMPARE([$fop_version], [$1],
+ [if test "x$use_fop" = xauto; then
+ AC_MSG_WARN([fop version $fop_version found, but $1 needed])
+ have_fop=no
+ else
+ AC_MSG_ERROR([fop version $fop_version found, but $1 needed])
+ fi])
+fi])
AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes])
]) # XORG_WITH_FOP
@@ -1836,12 +1958,12 @@ AM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes])
# parm1: specify the default value, yes or no.
#
AC_DEFUN([XORG_ENABLE_DOCS],[
-m4_define([default], m4_default([$1], [yes]))
+m4_define([docs_default], m4_default([$1], [yes]))
AC_ARG_ENABLE(docs,
AS_HELP_STRING([--enable-docs],
- [Enable building the documentation (default: ]default[)]),
- [build_docs=$enableval], [build_docs=]default)
-m4_undefine([default])
+ [Enable building the documentation (default: ]docs_default[)]),
+ [build_docs=$enableval], [build_docs=]docs_default)
+m4_undefine([docs_default])
AM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes])
AC_MSG_CHECKING([whether to build documentation])
AC_MSG_RESULT([$build_docs])
@@ -1913,6 +2035,251 @@ AC_MSG_CHECKING([whether to build functional specifications])
AC_MSG_RESULT([$build_specs])
]) # XORG_ENABLE_SPECS
+# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto)
+# ----------------------------------------------
+# Minimum version: 1.13.0
+#
+# This macro enables a builder to enable/disable unit testing
+# It makes no assumption about the test cases implementation
+# Test cases may or may not use Automake "Support for test suites"
+# They may or may not use the software utility library GLib
+#
+# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL
+# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib.
+# The variable enable_unit_tests is used by other macros in this file.
+#
+# Interface to module:
+# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests
+# enable_unit_tests: used in configure.ac for additional configuration
+# --enable-unit-tests: 'yes' user instructs the module to build tests
+# 'no' user instructs the module not to build tests
+# parm1: specify the default value, yes or no.
+#
+AC_DEFUN([XORG_ENABLE_UNIT_TESTS],[
+AC_BEFORE([$0], [XORG_WITH_GLIB])
+AC_BEFORE([$0], [XORG_LD_WRAP])
+AC_REQUIRE([XORG_MEMORY_CHECK_FLAGS])
+m4_define([_defopt], m4_default([$1], [auto]))
+AC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests],
+ [Enable building unit test cases (default: ]_defopt[)]),
+ [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt)
+m4_undefine([_defopt])
+AM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno])
+AC_MSG_CHECKING([whether to build unit test cases])
+AC_MSG_RESULT([$enable_unit_tests])
+]) # XORG_ENABLE_UNIT_TESTS
+
+# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT])
+# ----------------------------------------
+# Minimum version: 1.13.0
+#
+# GLib is a library which provides advanced data structures and functions.
+# This macro enables a module to test for the presence of Glib.
+#
+# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing.
+# Otherwise the value of $enable_unit_tests is blank.
+#
+# Interface to module:
+# HAVE_GLIB: used in makefiles to conditionally build targets
+# with_glib: used in configure.ac to know if GLib has been found
+# --with-glib: 'yes' user instructs the module to use glib
+# 'no' user instructs the module not to use glib
+#
+AC_DEFUN([XORG_WITH_GLIB],[
+AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+m4_define([_defopt], m4_default([$2], [auto]))
+AC_ARG_WITH(glib, AS_HELP_STRING([--with-glib],
+ [Use GLib library for unit testing (default: ]_defopt[)]),
+ [with_glib=$withval], [with_glib=]_defopt)
+m4_undefine([_defopt])
+
+have_glib=no
+# Do not probe GLib if user explicitly disabled unit testing
+if test "x$enable_unit_tests" != x"no"; then
+ # Do not probe GLib if user explicitly disabled it
+ if test "x$with_glib" != x"no"; then
+ m4_ifval(
+ [$1],
+ [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])],
+ [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])]
+ )
+ fi
+fi
+
+# Not having GLib when unit testing has been explicitly requested is an error
+if test "x$enable_unit_tests" = x"yes"; then
+ if test "x$have_glib" = x"no"; then
+ AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found])
+ fi
+fi
+
+# Having unit testing disabled when GLib has been explicitly requested is an error
+if test "x$enable_unit_tests" = x"no"; then
+ if test "x$with_glib" = x"yes"; then
+ AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found])
+ fi
+fi
+
+# Not having GLib when it has been explicitly requested is an error
+if test "x$with_glib" = x"yes"; then
+ if test "x$have_glib" = x"no"; then
+ AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found])
+ fi
+fi
+
+AM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes])
+]) # XORG_WITH_GLIB
+
+# XORG_LD_WRAP([required|optional])
+# ---------------------------------
+# Minimum version: 1.13.0
+#
+# Check if linker supports -wrap, passed via compiler flags
+#
+# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing.
+# Otherwise the value of $enable_unit_tests is blank.
+#
+# Argument added in 1.16.0 - default is "required", to match existing behavior
+# of returning an error if enable_unit_tests is yes, and ld -wrap is not
+# available, an argument of "optional" allows use when some unit tests require
+# ld -wrap and others do not.
+#
+AC_DEFUN([XORG_LD_WRAP],[
+XORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no],
+ [AC_LANG_PROGRAM([#include <stdlib.h>
+ void __wrap_exit(int status) { return; }],
+ [exit(0);])])
+# Not having ld wrap when unit testing has been explicitly requested is an error
+if test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then
+ if test "x$have_ld_wrap" = x"no"; then
+ AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available])
+ fi
+fi
+AM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes])
+#
+]) # XORG_LD_WRAP
+
+# XORG_CHECK_LINKER_FLAGS
+# -----------------------
+# SYNOPSIS
+#
+# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE])
+#
+# DESCRIPTION
+#
+# Check whether the given linker FLAGS work with the current language's
+# linker, or whether they give an error.
+#
+# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
+# success/failure.
+#
+# PROGRAM-SOURCE is the program source to link with, if needed
+#
+# NOTE: Based on AX_CHECK_COMPILER_FLAGS.
+#
+# LICENSE
+#
+# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org>
+# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu>
+# Copyright (c) 2009 Matteo Frigo
+#
+# This program is free software: you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation, either version 3 of the License, or (at your
+# option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+# Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+# 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.#
+AC_DEFUN([XORG_CHECK_LINKER_FLAGS],
+[AC_MSG_CHECKING([whether the linker accepts $1])
+dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname:
+AS_LITERAL_IF([$1],
+ [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [
+ ax_save_FLAGS=$LDFLAGS
+ LDFLAGS="$1"
+ AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])],
+ AS_TR_SH(xorg_cv_linker_flags_[$1])=yes,
+ AS_TR_SH(xorg_cv_linker_flags_[$1])=no)
+ LDFLAGS=$ax_save_FLAGS])],
+ [ax_save_FLAGS=$LDFLAGS
+ LDFLAGS="$1"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM()],
+ eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes,
+ eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no)
+ LDFLAGS=$ax_save_FLAGS])
+eval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1])
+AC_MSG_RESULT($xorg_check_linker_flags)
+if test "x$xorg_check_linker_flags" = xyes; then
+ m4_default([$2], :)
+else
+ m4_default([$3], :)
+fi
+]) # XORG_CHECK_LINKER_FLAGS
+
+# XORG_MEMORY_CHECK_FLAGS
+# -----------------------
+# Minimum version: 1.16.0
+#
+# This macro attempts to find appropriate memory checking functionality
+# for various platforms which unit testing code may use to catch various
+# forms of memory allocation and access errors in testing.
+#
+# Interface to module:
+# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging
+# Usually added to TESTS_ENVIRONMENT in Makefile.am
+#
+# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim.
+#
+AC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[
+
+AC_REQUIRE([AC_CANONICAL_HOST])
+AC_ARG_VAR([XORG_MALLOC_DEBUG_ENV],
+ [Environment variables to enable memory checking in tests])
+
+# Check for different types of support on different platforms
+case $host_os in
+ solaris*)
+ AC_CHECK_LIB([umem], [umem_alloc],
+ [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default'])
+ ;;
+ *-gnu*) # GNU libc - Value is used as a single byte bit pattern,
+ # both directly and inverted, so should not be 0 or 255.
+ malloc_debug_env='MALLOC_PERTURB_=15'
+ ;;
+ darwin*)
+ malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib'
+ ;;
+ *bsd*)
+ malloc_debug_env='MallocPreScribble=1 MallocScribble=1'
+ ;;
+esac
+
+# User supplied flags override default flags
+if test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then
+ malloc_debug_env="$XORG_MALLOC_DEBUG_ENV"
+fi
+
+AC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env])
+]) # XORG_WITH_LINT
+
# XORG_CHECK_MALLOC_ZERO
# ----------------------
# Minimum version: 1.0.0
@@ -1929,18 +2296,16 @@ AC_ARG_ENABLE(malloc0returnsnull,
AC_MSG_CHECKING([whether malloc(0) returns NULL])
if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
- AC_RUN_IFELSE([
-char *malloc();
-char *realloc();
-char *calloc();
-main() {
+ AC_RUN_IFELSE([AC_LANG_PROGRAM([
+#include <stdlib.h>
+],[
char *m0, *r0, *c0, *p;
m0 = malloc(0);
p = malloc(10);
r0 = realloc(p,0);
- c0 = calloc(0);
- exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1);
-}],
+ c0 = calloc(0,10);
+ exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1);
+])],
[MALLOC_ZERO_RETURNS_NULL=yes],
[MALLOC_ZERO_RETURNS_NULL=no],
[MALLOC_ZERO_RETURNS_NULL=yes])
@@ -2066,59 +2431,296 @@ AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
]) # XORG_LINT_LIBRARY
+# XORG_COMPILER_BRAND
+# -------------------
+# Minimum version: 1.14.0
+#
+# Checks for various brands of compilers and sets flags as appropriate:
+# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes"
+# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes"
+# clang compiler - sets CLANGCC to "yes"
+# Intel compiler - sets INTELCC to "yes"
+# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes"
+#
+AC_DEFUN([XORG_COMPILER_BRAND], [
+AC_LANG_CASE(
+ [C], [
+ AC_REQUIRE([AC_PROG_CC_C99])
+ ],
+ [C++], [
+ AC_REQUIRE([AC_PROG_CXX])
+ ]
+)
+AC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"])
+AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"])
+AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
+]) # XORG_COMPILER_BRAND
+
+# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...])
+# ---------------
+# Minimum version: 1.16.0
+#
+# Test if the compiler works when passed the given flag as a command line argument.
+# If it succeeds, the flag is appeneded to the given variable. If not, it tries the
+# next flag in the list until there are no more options.
+#
+# Note that this does not guarantee that the compiler supports the flag as some
+# compilers will simply ignore arguments that they do not understand, but we do
+# attempt to weed out false positives by using -Werror=unknown-warning-option and
+# -Werror=unused-command-line-argument
+#
+AC_DEFUN([XORG_TESTSET_CFLAG], [
+m4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])])
+m4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])])
+
+AC_LANG_COMPILER_REQUIRE
+
+AC_LANG_CASE(
+ [C], [
+ AC_REQUIRE([AC_PROG_CC_C99])
+ define([PREFIX], [C])
+ ],
+ [C++], [
+ define([PREFIX], [CXX])
+ ]
+)
+
+[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option"
+ AC_CACHE_CHECK([if compiler supports -Werror=unknown-warning-option],
+ xorg_cv_compiler_flag_unknown_warning_option,
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])],
+ [xorg_cv_compiler_flag_unknown_warning_option=yes],
+ [xorg_cv_compiler_flag_unknown_warning_option=no]))
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]"
+fi
+
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option"
+ fi
+ PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument"
+ AC_CACHE_CHECK([if compiler supports -Werror=unused-command-line-argument],
+ xorg_cv_compiler_flag_unused_command_line_argument,
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])],
+ [xorg_cv_compiler_flag_unused_command_line_argument=yes],
+ [xorg_cv_compiler_flag_unused_command_line_argument=no]))
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]"
+fi
+
+found="no"
+m4_foreach([flag], m4_cdr($@), [
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument"
+ fi
+
+ PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag["
+
+dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname
+ AC_MSG_CHECKING([if $CC supports ]flag[])
+ cacheid=`AS_ECHO([xorg_cv_cc_flag_]flag[])`
+ AC_CACHE_VAL(AS_TR_SH($cacheid),
+ [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])],
+ [eval AS_TR_SH($cacheid)=yes],
+ [eval AS_TR_SH($cacheid)=no])])
+
+ PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]"
+
+ eval supported=$AS_TR_SH($cacheid)
+ AC_MSG_RESULT([$supported])
+ if test "$supported" = "yes" ; then
+ $1="$$1 ]flag["
+ found="yes"
+ fi
+ fi
+])
+]) # XORG_TESTSET_CFLAG
+
+# XORG_COMPILER_FLAGS
+# ---------------
+# Minimum version: 1.16.0
+#
+# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line
+# arguments supported by the selected compiler which do NOT alter the generated
+# code. These arguments will cause the compiler to print various warnings
+# during compilation AND turn a conservative set of warnings into errors.
+#
+# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in
+# future versions of util-macros as options are added to new compilers.
+#
+AC_DEFUN([XORG_COMPILER_FLAGS], [
+AC_REQUIRE([XORG_COMPILER_BRAND])
+
+AC_ARG_ENABLE(selective-werror,
+ AS_HELP_STRING([--disable-selective-werror],
+ [Turn off selective compiler errors. (default: enabled)]),
+ [SELECTIVE_WERROR=$enableval],
+ [SELECTIVE_WERROR=yes])
+
+AC_LANG_CASE(
+ [C], [
+ define([PREFIX], [C])
+ ],
+ [C++], [
+ define([PREFIX], [CXX])
+ ]
+)
+# -v is too short to test reliably with XORG_TESTSET_CFLAG
+if test "x$SUNCC" = "xyes"; then
+ [BASE_]PREFIX[FLAGS]="-v"
+else
+ [BASE_]PREFIX[FLAGS]=""
+fi
+
+# This chunk of warnings were those that existed in the legacy CWARNFLAGS
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat])
+
+AC_LANG_CASE(
+ [C], [
+ XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes])
+ XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes])
+ XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs])
+ XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast])
+ XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition])
+ XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement])
+ ]
+)
+
+# This chunk adds additional warnings that could catch undesired effects.
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls])
+
+# These are currently disabled because they are noisy. They will be enabled
+# in the future once the codebase is sufficiently modernized to silence
+# them. For now, I don't want them to drown out the other warnings.
+# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op])
+# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses])
+# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align])
+
+# Turn some warnings into errors, so we don't accidently get successful builds
+# when there are problems that should be fixed.
+
+if test "x$SELECTIVE_WERROR" = "xyes" ; then
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION
+else
+AC_MSG_WARN([You have chosen not to turn some select compiler warnings into errors. This should not be necessary. Please report why you needed to do so in a bug report at $PACKAGE_BUGREPORT])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast])
+fi
+
+AC_SUBST([BASE_]PREFIX[FLAGS])
+]) # XORG_COMPILER_FLAGS
+
# XORG_CWARNFLAGS
# ---------------
# Minimum version: 1.2.0
+# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead)
#
# Defines CWARNFLAGS to enable C compiler warnings.
#
+# This function is deprecated because it defines -fno-strict-aliasing
+# which alters the code generated by the compiler. If -fno-strict-aliasing
+# is needed, then it should be added explicitly in the module when
+# it is updated to use BASE_CFLAGS.
+#
AC_DEFUN([XORG_CWARNFLAGS], [
-AC_REQUIRE([AC_PROG_CC_C99])
-if test "x$GCC" = xyes ; then
- CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
--Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
--Wbad-function-cast -Wformat=2"
- case `$CC -dumpversion` in
- 3.4.* | 4.*)
- CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement"
- ;;
- esac
-else
- AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
- if test "x$SUNCC" = "xyes"; then
- CWARNFLAGS="-v"
- fi
-fi
-AC_SUBST(CWARNFLAGS)
+AC_REQUIRE([XORG_COMPILER_FLAGS])
+AC_REQUIRE([XORG_COMPILER_BRAND])
+AC_LANG_CASE(
+ [C], [
+ CWARNFLAGS="$BASE_CFLAGS"
+ if test "x$GCC" = xyes ; then
+ CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing"
+ fi
+ AC_SUBST(CWARNFLAGS)
+ ]
+)
]) # XORG_CWARNFLAGS
# XORG_STRICT_OPTION
# -----------------------
# Minimum version: 1.3.0
#
-# Add configure option to enable strict compilation
+# Add configure option to enable strict compilation flags, such as treating
+# warnings as fatal errors.
+# If --enable-strict-compilation is passed to configure, adds strict flags to
+# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS.
+#
+# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or
+# when strict compilation is unconditionally desired.
AC_DEFUN([XORG_STRICT_OPTION], [
-# If the module's configure.ac calls AC_PROG_CC later on, CC gets set to C89
-AC_REQUIRE([AC_PROG_CC_C99])
AC_REQUIRE([XORG_CWARNFLAGS])
+AC_REQUIRE([XORG_COMPILER_FLAGS])
AC_ARG_ENABLE(strict-compilation,
AS_HELP_STRING([--enable-strict-compilation],
[Enable all warnings from compiler and make them errors (default: disabled)]),
[STRICT_COMPILE=$enableval], [STRICT_COMPILE=no])
+
+AC_LANG_CASE(
+ [C], [
+ define([PREFIX], [C])
+ ],
+ [C++], [
+ define([PREFIX], [CXX])
+ ]
+)
+
+[STRICT_]PREFIX[FLAGS]=""
+XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic])
+XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn])
+
+# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not
+# activate it with -Werror, so we add it here explicitly.
+XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes])
+
if test "x$STRICT_COMPILE" = "xyes"; then
- AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
- AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"])
- if test "x$GCC" = xyes ; then
- STRICT_CFLAGS="-pedantic -Werror"
- elif test "x$SUNCC" = "xyes"; then
- STRICT_CFLAGS="-errwarn"
- elif test "x$INTELCC" = "xyes"; then
- STRICT_CFLAGS="-Werror"
- fi
+ [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]"
+ AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"])
fi
-CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
-AC_SUBST([CWARNFLAGS])
+AC_SUBST([STRICT_]PREFIX[FLAGS])
+AC_SUBST([BASE_]PREFIX[FLAGS])
+AC_LANG_CASE([C], AC_SUBST([CWARNFLAGS]))
]) # XORG_STRICT_OPTION
# XORG_DEFAULT_OPTIONS
@@ -2129,6 +2731,7 @@ AC_SUBST([CWARNFLAGS])
#
AC_DEFUN([XORG_DEFAULT_OPTIONS], [
AC_REQUIRE([AC_PROG_INSTALL])
+XORG_COMPILER_FLAGS
XORG_CWARNFLAGS
XORG_STRICT_OPTION
XORG_RELEASE_VERSION
diff --git a/app/bitmap/app-defaults/Bitmap b/app/bitmap/app-defaults/Bitmap
index f9cc2201f..e55fce008 100644
--- a/app/bitmap/app-defaults/Bitmap
+++ b/app/bitmap/app-defaults/Bitmap
@@ -101,11 +101,11 @@
*SmeBSB.HorizontalMargins: 32
*fileMenu.new.label: New (Ctrl-N)...
-*fileMenu.load.label: Load (Ctrl-F)...
-*fileMenu.insert.label: Insert (Ctrl-I)...
+*fileMenu.load.label: Load (Ctrl-F)...
+*fileMenu.insert.label: Insert (Ctrl-I)...
*fileMenu.save.label: Save (Ctrl-S)
*fileMenu.saveAs.label: Save As (Ctrl-W)...
-*fileMenu.resize.label: Resize (Ctrl-R)...
+*fileMenu.resize.label: Resize (Ctrl-R)...
*fileMenu.rescale.label: Rescale (Ctrl-X)...
*fileMenu.filename.label: Filename (Ctrl-E)...
*fileMenu.basename.label: Basename (Ctrl-B)...
diff --git a/app/bitmap/app-defaults/Bitmap-nocase b/app/bitmap/app-defaults/Bitmap-nocase
index 4b35387f9..bcd4c4c5c 100644
--- a/app/bitmap/app-defaults/Bitmap-nocase
+++ b/app/bitmap/app-defaults/Bitmap-nocase
@@ -104,11 +104,11 @@
*SmeBSB.HorizontalMargins: 32
*fileMenu.new.label: New (Ctrl-N)...
-*fileMenu.load.label: Load (Ctrl-F)...
-*fileMenu.insert.label: Insert (Ctrl-I)...
+*fileMenu.load.label: Load (Ctrl-F)...
+*fileMenu.insert.label: Insert (Ctrl-I)...
*fileMenu.save.label: Save (Ctrl-S)
*fileMenu.saveAs.label: Save As (Ctrl-W)...
-*fileMenu.resize.label: Resize (Ctrl-R)...
+*fileMenu.resize.label: Resize (Ctrl-R)...
*fileMenu.rescale.label: Rescale (Ctrl-X)...
*fileMenu.filename.label: Filename (Ctrl-E)...
*fileMenu.basename.label: Basename (Ctrl-B)...
diff --git a/app/bitmap/atobm.c b/app/bitmap/atobm.c
index ec419447e..23697f3e5 100644
--- a/app/bitmap/atobm.c
+++ b/app/bitmap/atobm.c
@@ -38,21 +38,21 @@ from The Open Group.
static char *ProgramName;
-static void doit(FILE *fp, char *filename, char *chars,
- int xhot, int yhot, char *name);
+static void doit(FILE *fp, const char *filename, const char *chars,
+ int xhot, int yhot, const char *name);
-static void
+static void
usage (void)
{
fprintf (stderr, "usage: %s [-options ...] [filename]\n\n",
ProgramName);
- fprintf (stderr,
+ fprintf (stderr,
"where options include:\n");
- fprintf (stderr,
+ fprintf (stderr,
" -chars cc chars to use for 0 and 1 bits, respectively\n");
- fprintf (stderr,
+ fprintf (stderr,
" -name variable name to use in bitmap file\n");
- fprintf (stderr,
+ fprintf (stderr,
" -xhot number x position of hotspot\n");
fprintf (stderr,
" -yhot number y position of hotspot\n");
@@ -96,8 +96,8 @@ main (int argc, char *argv[])
int i;
int xhot = -1, yhot = -1;
char *filename = NULL;
- char *chars = "-#";
- char *name = NULL;
+ const char *chars = "-#";
+ const char *name = NULL;
FILE *fp;
ProgramName = argv[0];
@@ -152,8 +152,8 @@ main (int argc, char *argv[])
fp = stdin;
}
- if (!name) name = filename ? StripName (filename) : "";
- cify_name (name);
+ if (!name)
+ name = filename ? cify_name (StripName (filename)) : "";
doit (fp, filename, chars, xhot, yhot, name);
if (filename) (void) fclose (fp);
@@ -162,11 +162,11 @@ main (int argc, char *argv[])
static void
-doit (FILE *fp,
- char *filename,
- char *chars,
- int xhot, int yhot,
- char *name)
+doit (FILE *fp,
+ const char *filename,
+ const char *chars,
+ int xhot, int yhot,
+ const char *name)
{
int i, j;
int last_character;
@@ -187,7 +187,7 @@ doit (FILE *fp,
static unsigned char masktable[] = {
0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80 };
int padded = 0;
-
+
#define NTOALLOC 16
#define NewSList() \
slist = (struct _scan_list *) calloc (1, sizeof *slist); \
@@ -204,7 +204,7 @@ doit (FILE *fp,
return; \
} \
slist->used = 0; \
- slist->next = NULL;
+ slist->next = NULL;
while (1) {
buf[0] = '\0';
diff --git a/app/bitmap/bmtoa.c b/app/bitmap/bmtoa.c
index bdd2078c2..c20d44c07 100644
--- a/app/bitmap/bmtoa.c
+++ b/app/bitmap/bmtoa.c
@@ -44,21 +44,21 @@ from The Open Group.
#include <stdlib.h>
#include <unistd.h>
-#ifndef HAS_MKSTEMP
+#ifndef HAVE_MKSTEMP
extern char *mktemp();
#endif
static char *ProgramName;
-static void print_scanline (unsigned int width, unsigned int height,
- unsigned char *data, char *chars);
+static void print_scanline (unsigned int width, unsigned int height,
+ unsigned const char *data, const char *chars);
-static void
+static void
usage (void)
{
fprintf (stderr, "usage: %s [-options ...] [filename]\n\n",
ProgramName);
- fprintf (stderr,
+ fprintf (stderr,
"where options include:\n");
fprintf (stderr,
" -chars cc chars to use for 0 and 1 bits, respectively\n");
@@ -78,7 +78,7 @@ copy_stdin (void)
FILE *fp;
int nread, nwritten;
-#ifndef HAS_MKSTEMP
+#ifndef HAVE_MKSTEMP
if (mktemp (tmpfilename) == NULL) {
fprintf (stderr,
"%s: unable to genererate temporary file name for stdin.\n",
@@ -116,11 +116,11 @@ copy_stdin (void)
}
int
-main (int argc, char *argv[])
+main (int argc, char *argv[])
{
- char *filename = NULL;
+ const char *filename = NULL;
int isstdin = 0;
- char *chars = "-#";
+ const char *chars = "-#";
int i;
unsigned int width, height;
unsigned char *data;
@@ -130,7 +130,7 @@ main (int argc, char *argv[])
ProgramName = argv[0];
for (i = 1; i < argc; i++) {
- char *arg = argv[i];
+ const char *arg = argv[i];
if (arg[0] == '-') {
switch (arg[1]) {
@@ -175,24 +175,17 @@ main (int argc, char *argv[])
}
static void
-print_scanline (unsigned int width,
- unsigned int height,
- unsigned char *data,
- char *chars)
+print_scanline (unsigned int width,
+ unsigned int height,
+ unsigned const char *data,
+ const char *chars)
{
- char *scanline = (char *) malloc (width + 1);
- unsigned char *dp = data;
+ unsigned const char *dp = data;
int row, column;
- static unsigned char masktable[] = {
+ static unsigned const char masktable[] = {
0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80 };
int padded = ((width & 7) != 0);
- if (!scanline) {
- fprintf (stderr, "%s: unable to allocate %d bytes for scanline\n",
- ProgramName, width + 1);
- exit (1);
- }
-
for (row = 0; row < height; row++) {
for (column = 0; column < width; column++) {
int i = (column & 7);
diff --git a/app/bitmap/config.h.in b/app/bitmap/config.h.in
index 3f32d43c4..67119c50c 100644
--- a/app/bitmap/config.h.in
+++ b/app/bitmap/config.h.in
@@ -1,14 +1,17 @@
/* config.h.in. Generated from configure.ac by autoheader. */
-/* Define to 1 if you have the "mkstemp" function. */
-#undef HAS_MKSTEMP
-
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
+/* Define to 1 if you have the `lrint' function. */
+#undef HAVE_LRINT
+
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
+/* Define to 1 if you have the `mkstemp' function. */
+#undef HAVE_MKSTEMP
+
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
diff --git a/app/bitmap/configure b/app/bitmap/configure
index 2f845f05e..82808e31c 100644
--- a/app/bitmap/configure
+++ b/app/bitmap/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.62 for bitmap 1.0.5.
+# Generated by GNU Autoconf 2.62 for bitmap 1.0.6.
#
# Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>.
#
@@ -596,10 +596,11 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
PACKAGE_NAME='bitmap'
PACKAGE_TARNAME='bitmap'
-PACKAGE_VERSION='1.0.5'
-PACKAGE_STRING='bitmap 1.0.5'
+PACKAGE_VERSION='1.0.6'
+PACKAGE_STRING='bitmap 1.0.6'
PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg'
+ac_unique_file="Makefile.am"
# Factoring default headers for most tests.
ac_includes_default="\
#include <stdio.h>
@@ -716,7 +717,9 @@ am__fastdepCC_FALSE
CPP
GREP
EGREP
+BASE_CFLAGS
CWARNFLAGS
+STRICT_CFLAGS
CHANGELOG_CMD
PKG_CONFIG
INSTALL_CMD
@@ -744,6 +747,7 @@ ADMIN_MAN_DIR
XORG_MAN_PAGE
MAN_SUBSTS
AM_DEFAULT_VERBOSITY
+MATH_LIBS
BMTOA_CFLAGS
BMTOA_LIBS
ATOBM_CFLAGS
@@ -760,6 +764,7 @@ ac_user_opts='
enable_option_checking
enable_maintainer_mode
enable_dependency_tracking
+enable_selective_werror
enable_strict_compilation
with_appdefaultdir
'
@@ -1333,7 +1338,7 @@ 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 bitmap 1.0.5 to adapt to many kinds of systems.
+\`configure' configures bitmap 1.0.6 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1403,7 +1408,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of bitmap 1.0.5:";;
+ short | recursive ) echo "Configuration of bitmap 1.0.6:";;
esac
cat <<\_ACEOF
@@ -1415,6 +1420,9 @@ Optional Features:
(and sometimes confusing) to the casual installer
--disable-dependency-tracking speeds up one-time build
--enable-dependency-tracking do not reject slow dependency extractors
+ --disable-selective-werror
+ Turn off selective compiler errors. (default:
+ enabled)
--enable-strict-compilation
Enable all warnings from compiler and make them
errors (default: disabled)
@@ -1516,7 +1524,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-bitmap configure 1.0.5
+bitmap configure 1.0.6
generated by GNU Autoconf 2.62
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1530,7 +1538,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by bitmap $as_me 1.0.5, which was
+It was created by bitmap $as_me 1.0.6, which was
generated by GNU Autoconf 2.62. Invocation command line was
$ $0 $@
@@ -1896,6 +1904,11 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ac_config_headers="$ac_config_headers config.h"
+
+
+# Initialize Automake
am__api_version="1.9"
ac_aux_dir=
for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
@@ -2179,7 +2192,7 @@ fi
# Define the identity of the package.
PACKAGE='bitmap'
- VERSION='1.0.5'
+ VERSION='1.0.6'
cat >>confdefs.h <<_ACEOF
@@ -4291,6 +4304,188 @@ done
+
+
+{ $as_echo "$as_me:$LINENO: checking whether __clang__ is declared" >&5
+$as_echo_n "checking whether __clang__ is declared... " >&6; }
+if test "${ac_cv_have_decl___clang__+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+#ifndef __clang__
+ (void) __clang__;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_have_decl___clang__=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_have_decl___clang__=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl___clang__" >&5
+$as_echo "$ac_cv_have_decl___clang__" >&6; }
+if test $ac_cv_have_decl___clang__ = yes; then
+ CLANGCC="yes"
+else
+ CLANGCC="no"
+fi
+
+{ $as_echo "$as_me:$LINENO: checking whether __INTEL_COMPILER is declared" >&5
+$as_echo_n "checking whether __INTEL_COMPILER is declared... " >&6; }
+if test "${ac_cv_have_decl___INTEL_COMPILER+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+#ifndef __INTEL_COMPILER
+ (void) __INTEL_COMPILER;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_have_decl___INTEL_COMPILER=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_have_decl___INTEL_COMPILER=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl___INTEL_COMPILER" >&5
+$as_echo "$ac_cv_have_decl___INTEL_COMPILER" >&6; }
+if test $ac_cv_have_decl___INTEL_COMPILER = yes; then
+ INTELCC="yes"
+else
+ INTELCC="no"
+fi
+
+{ $as_echo "$as_me:$LINENO: checking whether __SUNPRO_C is declared" >&5
+$as_echo_n "checking whether __SUNPRO_C is declared... " >&6; }
+if test "${ac_cv_have_decl___SUNPRO_C+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+#ifndef __SUNPRO_C
+ (void) __SUNPRO_C;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_have_decl___SUNPRO_C=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_have_decl___SUNPRO_C=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl___SUNPRO_C" >&5
+$as_echo "$ac_cv_have_decl___SUNPRO_C" >&6; }
+if test $ac_cv_have_decl___SUNPRO_C = yes; then
+ SUNCC="yes"
+else
+ SUNCC="no"
+fi
+
+
+
+
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
@@ -4567,19 +4762,44 @@ $as_echo "$ac_cv_path_SED" >&6; }
-if test "x$GCC" = xyes ; then
- CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
--Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
--Wbad-function-cast -Wformat=2"
- case `$CC -dumpversion` in
- 3.4.* | 4.*)
- CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement"
- ;;
- esac
+
+# Check whether --enable-selective-werror was given.
+if test "${enable_selective_werror+set}" = set; then
+ enableval=$enable_selective_werror; SELECTIVE_WERROR=$enableval
else
- { $as_echo "$as_me:$LINENO: checking whether __SUNPRO_C is declared" >&5
-$as_echo_n "checking whether __SUNPRO_C is declared... " >&6; }
-if test "${ac_cv_have_decl___SUNPRO_C+set}" = set; then
+ SELECTIVE_WERROR=yes
+fi
+
+
+
+
+
+# -v is too short to test reliably with XORG_TESTSET_CFLAG
+if test "x$SUNCC" = "xyes"; then
+ BASE_CFLAGS="-v"
+else
+ BASE_CFLAGS=""
+fi
+
+# This chunk of warnings were those that existed in the legacy CWARNFLAGS
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if test "${xorg_cv_compiler_flag_unknown_warning_option+set}" = set; then
$as_echo_n "(cached) " >&6
else
cat >conftest.$ac_ext <<_ACEOF
@@ -4588,18 +4808,203 @@ _ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-$ac_includes_default
+int i;
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ xorg_cv_compiler_flag_unknown_warning_option=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ xorg_cv_compiler_flag_unknown_warning_option=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if test "${xorg_cv_compiler_flag_unused_command_line_argument+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ xorg_cv_compiler_flag_unused_command_line_argument=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+found="no"
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ fi
+
+ CFLAGS="$CFLAGS -Wall"
+
+ { $as_echo "$as_me:$LINENO: checking if $CC supports -Wall" >&5
+$as_echo_n "checking if $CC supports -Wall... " >&6; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Wall`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
int
main ()
{
-#ifndef __SUNPRO_C
- (void) __SUNPRO_C;
-#endif
;
return 0;
}
_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ 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
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:$LINENO: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -Wall"
+ found="yes"
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if test "${xorg_cv_compiler_flag_unknown_warning_option+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
@@ -4618,46 +5023,173 @@ $as_echo "$ac_try_echo") >&5
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
- ac_cv_have_decl___SUNPRO_C=yes
+ xorg_cv_compiler_flag_unknown_warning_option=yes
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_cv_have_decl___SUNPRO_C=no
+ xorg_cv_compiler_flag_unknown_warning_option=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl___SUNPRO_C" >&5
-$as_echo "$ac_cv_have_decl___SUNPRO_C" >&6; }
-if test $ac_cv_have_decl___SUNPRO_C = yes; then
- SUNCC="yes"
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if test "${xorg_cv_compiler_flag_unused_command_line_argument+set}" = set; then
+ $as_echo_n "(cached) " >&6
else
- SUNCC="no"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ xorg_cv_compiler_flag_unused_command_line_argument=no
fi
- if test "x$SUNCC" = "xyes"; then
- CWARNFLAGS="-v"
- fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
fi
+found="no"
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
-# If the module's configure.ac calls AC_PROG_CC later on, CC gets set to C89
+ if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ fi
+ CFLAGS="$CFLAGS -Wpointer-arith"
+ { $as_echo "$as_me:$LINENO: checking if $CC supports -Wpointer-arith" >&5
+$as_echo_n "checking if $CC supports -Wpointer-arith... " >&6; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Wpointer-arith`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
-# Check whether --enable-strict-compilation was given.
-if test "${enable_strict_compilation+set}" = set; then
- enableval=$enable_strict_compilation; STRICT_COMPILE=$enableval
+ ;
+ return 0;
+}
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ 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
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
else
- STRICT_COMPILE=no
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
fi
-if test "x$STRICT_COMPILE" = "xyes"; then
- { $as_echo "$as_me:$LINENO: checking whether __SUNPRO_C is declared" >&5
-$as_echo_n "checking whether __SUNPRO_C is declared... " >&6; }
-if test "${ac_cv_have_decl___SUNPRO_C+set}" = set; then
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:$LINENO: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -Wpointer-arith"
+ found="yes"
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if test "${xorg_cv_compiler_flag_unknown_warning_option+set}" = set; then
$as_echo_n "(cached) " >&6
else
cat >conftest.$ac_ext <<_ACEOF
@@ -4666,18 +5198,203 @@ _ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-$ac_includes_default
+int i;
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ xorg_cv_compiler_flag_unknown_warning_option=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ xorg_cv_compiler_flag_unknown_warning_option=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if test "${xorg_cv_compiler_flag_unused_command_line_argument+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ xorg_cv_compiler_flag_unused_command_line_argument=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+found="no"
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ fi
+
+ CFLAGS="$CFLAGS -Wmissing-declarations"
+
+ { $as_echo "$as_me:$LINENO: checking if $CC supports -Wmissing-declarations" >&5
+$as_echo_n "checking if $CC supports -Wmissing-declarations... " >&6; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Wmissing-declarations`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
int
main ()
{
-#ifndef __SUNPRO_C
- (void) __SUNPRO_C;
-#endif
;
return 0;
}
_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ 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
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:$LINENO: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -Wmissing-declarations"
+ found="yes"
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if test "${xorg_cv_compiler_flag_unknown_warning_option+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
@@ -4696,27 +5413,91 @@ $as_echo "$ac_try_echo") >&5
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
- ac_cv_have_decl___SUNPRO_C=yes
+ xorg_cv_compiler_flag_unknown_warning_option=yes
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_cv_have_decl___SUNPRO_C=no
+ xorg_cv_compiler_flag_unknown_warning_option=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl___SUNPRO_C" >&5
-$as_echo "$ac_cv_have_decl___SUNPRO_C" >&6; }
-if test $ac_cv_have_decl___SUNPRO_C = yes; then
- SUNCC="yes"
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if test "${xorg_cv_compiler_flag_unused_command_line_argument+set}" = set; then
+ $as_echo_n "(cached) " >&6
else
- SUNCC="no"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ xorg_cv_compiler_flag_unused_command_line_argument=no
fi
- { $as_echo "$as_me:$LINENO: checking whether __INTEL_COMPILER is declared" >&5
-$as_echo_n "checking whether __INTEL_COMPILER is declared... " >&6; }
-if test "${ac_cv_have_decl___INTEL_COMPILER+set}" = set; then
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+found="no"
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ fi
+
+ CFLAGS="$CFLAGS -Wformat=2"
+
+ { $as_echo "$as_me:$LINENO: checking if $CC supports -Wformat=2" >&5
+$as_echo_n "checking if $CC supports -Wformat=2... " >&6; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Wformat=2`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval "test \"\${$as_var+set}\" = set"; }; then
$as_echo_n "(cached) " >&6
else
cat >conftest.$ac_ext <<_ACEOF
@@ -4725,18 +5506,170 @@ _ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-$ac_includes_default
+int i;
int
main ()
{
-#ifndef __INTEL_COMPILER
- (void) __INTEL_COMPILER;
-#endif
;
return 0;
}
_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ 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
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:$LINENO: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -Wformat=2"
+ found="yes"
+ fi
+ fi
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ fi
+
+ CFLAGS="$CFLAGS -Wformat"
+
+ { $as_echo "$as_me:$LINENO: checking if $CC supports -Wformat" >&5
+$as_echo_n "checking if $CC supports -Wformat... " >&6; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Wformat`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ 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
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:$LINENO: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -Wformat"
+ found="yes"
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if test "${xorg_cv_compiler_flag_unknown_warning_option+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
@@ -4755,136 +5688,933 @@ $as_echo "$ac_try_echo") >&5
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
- ac_cv_have_decl___INTEL_COMPILER=yes
+ xorg_cv_compiler_flag_unknown_warning_option=yes
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_cv_have_decl___INTEL_COMPILER=no
+ xorg_cv_compiler_flag_unknown_warning_option=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl___INTEL_COMPILER" >&5
-$as_echo "$ac_cv_have_decl___INTEL_COMPILER" >&6; }
-if test $ac_cv_have_decl___INTEL_COMPILER = yes; then
- INTELCC="yes"
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if test "${xorg_cv_compiler_flag_unused_command_line_argument+set}" = set; then
+ $as_echo_n "(cached) " >&6
else
- INTELCC="no"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ xorg_cv_compiler_flag_unused_command_line_argument=no
fi
- if test "x$GCC" = xyes ; then
- STRICT_CFLAGS="-pedantic -Werror"
- elif test "x$SUNCC" = "xyes"; then
- STRICT_CFLAGS="-errwarn"
- elif test "x$INTELCC" = "xyes"; then
- STRICT_CFLAGS="-Werror"
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+found="no"
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ fi
+
+ CFLAGS="$CFLAGS -Wstrict-prototypes"
+
+ { $as_echo "$as_me:$LINENO: checking if $CC supports -Wstrict-prototypes" >&5
+$as_echo_n "checking if $CC supports -Wstrict-prototypes... " >&6; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Wstrict-prototypes`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ 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
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:$LINENO: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -Wstrict-prototypes"
+ found="yes"
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if test "${xorg_cv_compiler_flag_unknown_warning_option+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ xorg_cv_compiler_flag_unknown_warning_option=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ xorg_cv_compiler_flag_unknown_warning_option=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if test "${xorg_cv_compiler_flag_unused_command_line_argument+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ xorg_cv_compiler_flag_unused_command_line_argument=no
fi
-CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+found="no"
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_VERSION_MAJOR `echo $PACKAGE_VERSION | cut -d . -f 1`
+ if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ fi
+
+ CFLAGS="$CFLAGS -Wmissing-prototypes"
+
+ { $as_echo "$as_me:$LINENO: checking if $CC supports -Wmissing-prototypes" >&5
+$as_echo_n "checking if $CC supports -Wmissing-prototypes... " >&6; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Wmissing-prototypes`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
- PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
- if test "x$PVM" = "x"; then
- PVM="0"
+ ;
+ return 0;
+}
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ 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
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:$LINENO: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -Wmissing-prototypes"
+ found="yes"
+ fi
fi
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_VERSION_MINOR $PVM
+
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if test "${xorg_cv_compiler_flag_unknown_warning_option+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ xorg_cv_compiler_flag_unknown_warning_option=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
- PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
- if test "x$PVP" = "x"; then
- PVP="0"
+ xorg_cv_compiler_flag_unknown_warning_option=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if test "${xorg_cv_compiler_flag_unused_command_line_argument+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_VERSION_PATCHLEVEL $PVP
+ xorg_cv_compiler_flag_unused_command_line_argument=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+found="no"
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ fi
+
+ CFLAGS="$CFLAGS -Wnested-externs"
+
+ { $as_echo "$as_me:$LINENO: checking if $CC supports -Wnested-externs" >&5
+$as_echo_n "checking if $CC supports -Wnested-externs... " >&6; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Wnested-externs`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ 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
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
-CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \
-mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \
-|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \
-echo 'git directory not found: installing possibly empty changelog.' >&2)"
+ CFLAGS="$xorg_testset_save_CFLAGS"
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:$LINENO: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -Wnested-externs"
+ found="yes"
+ fi
+ fi
-macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros`
-INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \
-mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \
-|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \
-echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)"
-if test x$APP_MAN_SUFFIX = x ; then
- APP_MAN_SUFFIX=1
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if test "${xorg_cv_compiler_flag_unknown_warning_option+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ xorg_cv_compiler_flag_unknown_warning_option=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ xorg_cv_compiler_flag_unknown_warning_option=no
fi
-if test x$APP_MAN_DIR = x ; then
- APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
fi
-if test x$LIB_MAN_SUFFIX = x ; then
- LIB_MAN_SUFFIX=3
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if test "${xorg_cv_compiler_flag_unused_command_line_argument+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ xorg_cv_compiler_flag_unused_command_line_argument=no
fi
-if test x$LIB_MAN_DIR = x ; then
- LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
fi
-if test x$FILE_MAN_SUFFIX = x ; then
- case $host_os in
- solaris*) FILE_MAN_SUFFIX=4 ;;
- *) FILE_MAN_SUFFIX=5 ;;
- esac
+found="no"
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ fi
+
+ CFLAGS="$CFLAGS -Wbad-function-cast"
+
+ { $as_echo "$as_me:$LINENO: checking if $CC supports -Wbad-function-cast" >&5
+$as_echo_n "checking if $CC supports -Wbad-function-cast... " >&6; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Wbad-function-cast`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ 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
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
fi
-if test x$FILE_MAN_DIR = x ; then
- FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
fi
-if test x$MISC_MAN_SUFFIX = x ; then
- case $host_os in
- solaris*) MISC_MAN_SUFFIX=5 ;;
- *) MISC_MAN_SUFFIX=7 ;;
- esac
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:$LINENO: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -Wbad-function-cast"
+ found="yes"
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if test "${xorg_cv_compiler_flag_unknown_warning_option+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ xorg_cv_compiler_flag_unknown_warning_option=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ xorg_cv_compiler_flag_unknown_warning_option=no
fi
-if test x$MISC_MAN_DIR = x ; then
- MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
fi
-if test x$DRIVER_MAN_SUFFIX = x ; then
- case $host_os in
- solaris*) DRIVER_MAN_SUFFIX=7 ;;
- *) DRIVER_MAN_SUFFIX=4 ;;
- esac
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if test "${xorg_cv_compiler_flag_unused_command_line_argument+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ xorg_cv_compiler_flag_unused_command_line_argument=no
fi
-if test x$DRIVER_MAN_DIR = x ; then
- DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
fi
-if test x$ADMIN_MAN_SUFFIX = x ; then
- case $host_os in
- solaris*) ADMIN_MAN_SUFFIX=1m ;;
- *) ADMIN_MAN_SUFFIX=8 ;;
- esac
+found="no"
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ fi
+
+ CFLAGS="$CFLAGS -Wold-style-definition"
+
+ { $as_echo "$as_me:$LINENO: checking if $CC supports -Wold-style-definition" >&5
+$as_echo_n "checking if $CC supports -Wold-style-definition... " >&6; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Wold-style-definition`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ 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
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
fi
-if test x$ADMIN_MAN_DIR = x ; then
- ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
fi
+ CFLAGS="$xorg_testset_save_CFLAGS"
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:$LINENO: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -Wold-style-definition"
+ found="yes"
+ fi
+ fi
@@ -4897,384 +6627,1642 @@ fi
-XORG_MAN_PAGE="X Version 11"
-MAN_SUBSTS="\
- -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
- -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
- -e 's|__xservername__|Xorg|g' \
- -e 's|__xconfigfile__|xorg.conf|g' \
- -e 's|__projectroot__|\$(prefix)|g' \
- -e 's|__apploaddir__|\$(appdefaultdir)|g' \
- -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \
- -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \
- -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \
- -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \
- -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \
- -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'"
+xorg_testset_save_CFLAGS="$CFLAGS"
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if test "${xorg_cv_compiler_flag_unknown_warning_option+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ xorg_cv_compiler_flag_unknown_warning_option=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ xorg_cv_compiler_flag_unknown_warning_option=no
+fi
-AM_DEFAULT_VERBOSITY=1
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if test "${xorg_cv_compiler_flag_unused_command_line_argument+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ xorg_cv_compiler_flag_unused_command_line_argument=no
+fi
-ac_config_headers="$ac_config_headers config.h"
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+found="no"
-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:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ fi
+
+ CFLAGS="$CFLAGS -Wdeclaration-after-statement"
+
+ { $as_echo "$as_me:$LINENO: checking if $CC supports -Wdeclaration-after-statement" >&5
+$as_echo_n "checking if $CC supports -Wdeclaration-after-statement... " >&6; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Wdeclaration-after-statement`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval "test \"\${$as_var+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.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ 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
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
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:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- { $as_echo "$as_me:$LINENO: result: $CC" >&5
-$as_echo "$CC" >&6; }
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:$LINENO: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -Wdeclaration-after-statement"
+ found="yes"
+ fi
+ fi
+
+
+
+
+
+# This chunk adds additional warnings that could catch undesired effects.
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if test "${xorg_cv_compiler_flag_unknown_warning_option+set}" = set; then
+ $as_echo_n "(cached) " >&6
else
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ xorg_cv_compiler_flag_unknown_warning_option=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ xorg_cv_compiler_flag_unknown_warning_option=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
fi
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if test "${xorg_cv_compiler_flag_unused_command_line_argument+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ xorg_cv_compiler_flag_unused_command_line_argument=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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:$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 "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+found="no"
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ fi
+
+ CFLAGS="$CFLAGS -Wunused"
+
+ { $as_echo "$as_me:$LINENO: checking if $CC supports -Wunused" >&5
+$as_echo_n "checking if $CC supports -Wunused... " >&6; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Wunused`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval "test \"\${$as_var+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.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ 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
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
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:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:$LINENO: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -Wunused"
+ found="yes"
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if test "${xorg_cv_compiler_flag_unknown_warning_option+set}" = set; then
+ $as_echo_n "(cached) " >&6
else
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ xorg_cv_compiler_flag_unknown_warning_option=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ xorg_cv_compiler_flag_unknown_warning_option=no
fi
- if test "x$ac_ct_CC" = x; then
- CC=""
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&5
-$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&2;}
-ac_tool_warned=yes ;;
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if test "${xorg_cv_compiler_flag_unused_command_line_argument+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+_ACEOF
+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
- CC=$ac_ct_CC
- fi
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
else
- CC="$ac_cv_prog_CC"
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ xorg_cv_compiler_flag_unused_command_line_argument=no
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:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+found="no"
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ fi
+
+ CFLAGS="$CFLAGS -Wuninitialized"
+
+ { $as_echo "$as_me:$LINENO: checking if $CC supports -Wuninitialized" >&5
+$as_echo_n "checking if $CC supports -Wuninitialized... " >&6; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Wuninitialized`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval "test \"\${$as_var+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.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ 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
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
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:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- { $as_echo "$as_me:$LINENO: result: $CC" >&5
-$as_echo "$CC" >&6; }
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:$LINENO: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -Wuninitialized"
+ found="yes"
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if test "${xorg_cv_compiler_flag_unknown_warning_option+set}" = set; then
+ $as_echo_n "(cached) " >&6
else
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ xorg_cv_compiler_flag_unknown_warning_option=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ xorg_cv_compiler_flag_unknown_warning_option=no
fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
- fi
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if test "${xorg_cv_compiler_flag_unused_command_line_argument+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ xorg_cv_compiler_flag_unused_command_line_argument=no
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:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+found="no"
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ fi
+
+ CFLAGS="$CFLAGS -Wshadow"
+
+ { $as_echo "$as_me:$LINENO: checking if $CC supports -Wshadow" >&5
+$as_echo_n "checking if $CC supports -Wshadow... " >&6; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Wshadow`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval "test \"\${$as_var+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.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ 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
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
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:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
-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
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:$LINENO: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -Wshadow"
+ found="yes"
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if test "${xorg_cv_compiler_flag_unknown_warning_option+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ xorg_cv_compiler_flag_unknown_warning_option=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ xorg_cv_compiler_flag_unknown_warning_option=no
fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- { $as_echo "$as_me:$LINENO: result: $CC" >&5
-$as_echo "$CC" >&6; }
+
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if test "${xorg_cv_compiler_flag_unused_command_line_argument+set}" = set; then
+ $as_echo_n "(cached) " >&6
else
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ xorg_cv_compiler_flag_unused_command_line_argument=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+found="no"
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ fi
+ CFLAGS="$CFLAGS -Wcast-qual"
+ { $as_echo "$as_me:$LINENO: checking if $CC supports -Wcast-qual" >&5
+$as_echo_n "checking if $CC supports -Wcast-qual... " >&6; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Wcast-qual`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ 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
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
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:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:$LINENO: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -Wcast-qual"
+ found="yes"
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if test "${xorg_cv_compiler_flag_unknown_warning_option+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.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ xorg_cv_compiler_flag_unknown_warning_option=yes
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:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ xorg_cv_compiler_flag_unknown_warning_option=no
fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- { $as_echo "$as_me:$LINENO: result: $CC" >&5
-$as_echo "$CC" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if test "${xorg_cv_compiler_flag_unused_command_line_argument+set}" = set; then
+ $as_echo_n "(cached) " >&6
else
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ xorg_cv_compiler_flag_unused_command_line_argument=no
fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
- test -n "$CC" && break
- done
+found="no"
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ fi
+
+ CFLAGS="$CFLAGS -Wmissing-noreturn"
+
+ { $as_echo "$as_me:$LINENO: checking if $CC supports -Wmissing-noreturn" >&5
+$as_echo_n "checking if $CC supports -Wmissing-noreturn... " >&6; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Wmissing-noreturn`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ 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
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
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:$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
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:$LINENO: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -Wmissing-noreturn"
+ found="yes"
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if test "${xorg_cv_compiler_flag_unknown_warning_option+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.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ xorg_cv_compiler_flag_unknown_warning_option=yes
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:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ xorg_cv_compiler_flag_unknown_warning_option=no
fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if test "${xorg_cv_compiler_flag_unused_command_line_argument+set}" = set; then
+ $as_echo_n "(cached) " >&6
else
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ xorg_cv_compiler_flag_unused_command_line_argument=no
fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
- test -n "$ac_ct_CC" && break
-done
+found="no"
- if test "x$ac_ct_CC" = x; then
- CC=""
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&5
-$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&2;}
-ac_tool_warned=yes ;;
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ fi
+
+ CFLAGS="$CFLAGS -Wmissing-format-attribute"
+
+ { $as_echo "$as_me:$LINENO: checking if $CC supports -Wmissing-format-attribute" >&5
+$as_echo_n "checking if $CC supports -Wmissing-format-attribute... " >&6; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Wmissing-format-attribute`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+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
- CC=$ac_ct_CC
- fi
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ 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
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
fi
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
fi
-test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
+ CFLAGS="$xorg_testset_save_CFLAGS"
-# Provide some information about the compiler.
-$as_echo "$as_me:$LINENO: checking for C compiler version" >&5
-set X $ac_compile
-ac_compiler=$2
-{ (ac_try="$ac_compiler --version >&5"
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:$LINENO: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -Wmissing-format-attribute"
+ found="yes"
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if test "${xorg_cv_compiler_flag_unknown_warning_option+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+_ACEOF
+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:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
- (eval "$ac_compiler --version >&5") 2>&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-{ (ac_try="$ac_compiler -v >&5"
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ xorg_cv_compiler_flag_unknown_warning_option=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ xorg_cv_compiler_flag_unknown_warning_option=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if test "${xorg_cv_compiler_flag_unused_command_line_argument+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+_ACEOF
+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:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
- (eval "$ac_compiler -v >&5") 2>&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-{ (ac_try="$ac_compiler -V >&5"
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ xorg_cv_compiler_flag_unused_command_line_argument=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+found="no"
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ fi
+
+ CFLAGS="$CFLAGS -Wredundant-decls"
+
+ { $as_echo "$as_me:$LINENO: checking if $CC supports -Wredundant-decls" >&5
+$as_echo_n "checking if $CC supports -Wredundant-decls... " >&6; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Wredundant-decls`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+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:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
- (eval "$ac_compiler -V >&5") 2>&5
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
+ (exit $ac_status); } && {
+ 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
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
-{ $as_echo "$as_me:$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
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:$LINENO: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -Wredundant-decls"
+ found="yes"
+ fi
+ fi
+
+
+
+# These are currently disabled because they are noisy. They will be enabled
+# in the future once the codebase is sufficiently modernized to silence
+# them. For now, I don't want them to drown out the other warnings.
+# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op])
+# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses])
+# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align])
+
+# Turn some warnings into errors, so we don't accidently get successful builds
+# when there are problems that should be fixed.
+
+if test "x$SELECTIVE_WERROR" = "xyes" ; then
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if test "${xorg_cv_compiler_flag_unknown_warning_option+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ xorg_cv_compiler_flag_unknown_warning_option=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ xorg_cv_compiler_flag_unknown_warning_option=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if test "${xorg_cv_compiler_flag_unused_command_line_argument+set}" = set; then
$as_echo_n "(cached) " >&6
else
cat >conftest.$ac_ext <<_ACEOF
@@ -5283,18 +8271,229 @@ _ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
+int i;
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ xorg_cv_compiler_flag_unused_command_line_argument=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+found="no"
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ fi
+
+ CFLAGS="$CFLAGS -Werror=implicit"
+
+ { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=implicit" >&5
+$as_echo_n "checking if $CC supports -Werror=implicit... " >&6; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Werror=implicit`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
int
main ()
{
-#ifndef __GNUC__
- choke me
-#endif
;
return 0;
}
_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ 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
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:$LINENO: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -Werror=implicit"
+ found="yes"
+ fi
+ fi
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ fi
+
+ CFLAGS="$CFLAGS -errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED"
+
+ { $as_echo "$as_me:$LINENO: checking if $CC supports -errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED" >&5
+$as_echo_n "checking if $CC supports -errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED... " >&6; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ 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
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:$LINENO: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED"
+ found="yes"
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if test "${xorg_cv_compiler_flag_unknown_warning_option+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
@@ -5313,43 +8512,295 @@ $as_echo "$ac_try_echo") >&5
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
- ac_compiler_gnu=yes
+ xorg_cv_compiler_flag_unknown_warning_option=yes
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_compiler_gnu=no
+ xorg_cv_compiler_flag_unknown_warning_option=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:$LINENO: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if test "${xorg_cv_compiler_flag_unused_command_line_argument+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ xorg_cv_compiler_flag_unused_command_line_argument=no
fi
-{ $as_echo "$as_me:$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
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+found="no"
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ fi
+
+ CFLAGS="$CFLAGS -Werror=nonnull"
+
+ { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=nonnull" >&5
+$as_echo_n "checking if $CC supports -Werror=nonnull... " >&6; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Werror=nonnull`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
else
- GCC=
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ 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
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
fi
-ac_test_CFLAGS=${CFLAGS+set}
-ac_save_CFLAGS=$CFLAGS
-{ $as_echo "$as_me:$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
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:$LINENO: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -Werror=nonnull"
+ found="yes"
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if test "${xorg_cv_compiler_flag_unknown_warning_option+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 >conftest.$ac_ext <<_ACEOF
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
+int i;
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ xorg_cv_compiler_flag_unknown_warning_option=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ xorg_cv_compiler_flag_unknown_warning_option=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if test "${xorg_cv_compiler_flag_unused_command_line_argument+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ xorg_cv_compiler_flag_unused_command_line_argument=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+found="no"
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ fi
+
+ CFLAGS="$CFLAGS -Werror=init-self"
+
+ { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=init-self" >&5
+$as_echo_n "checking if $CC supports -Werror=init-self... " >&6; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Werror=init-self`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
int
main ()
{
@@ -5358,6 +8809,81 @@ main ()
return 0;
}
_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ 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
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:$LINENO: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -Werror=init-self"
+ found="yes"
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if test "${xorg_cv_compiler_flag_unknown_warning_option+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
@@ -5376,19 +8902,100 @@ $as_echo "$ac_try_echo") >&5
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
- ac_cv_prog_cc_g=yes
+ xorg_cv_compiler_flag_unknown_warning_option=yes
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- CFLAGS=""
- cat >conftest.$ac_ext <<_ACEOF
+ xorg_cv_compiler_flag_unknown_warning_option=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if test "${xorg_cv_compiler_flag_unused_command_line_argument+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
+int i;
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ xorg_cv_compiler_flag_unused_command_line_argument=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+found="no"
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ fi
+
+ CFLAGS="$CFLAGS -Werror=main"
+
+ { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=main" >&5
+$as_echo_n "checking if $CC supports -Werror=main... " >&6; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Werror=main`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
int
main ()
{
@@ -5397,6 +9004,81 @@ main ()
return 0;
}
_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ 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
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:$LINENO: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -Werror=main"
+ found="yes"
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if test "${xorg_cv_compiler_flag_unknown_warning_option+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
@@ -5415,20 +9097,100 @@ $as_echo "$ac_try_echo") >&5
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
- :
+ xorg_cv_compiler_flag_unknown_warning_option=yes
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_c_werror_flag=$ac_save_c_werror_flag
- CFLAGS="-g"
- cat >conftest.$ac_ext <<_ACEOF
+ xorg_cv_compiler_flag_unknown_warning_option=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if test "${xorg_cv_compiler_flag_unused_command_line_argument+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
+int i;
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ xorg_cv_compiler_flag_unused_command_line_argument=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+found="no"
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ fi
+
+ CFLAGS="$CFLAGS -Werror=missing-braces"
+
+ { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=missing-braces" >&5
+$as_echo_n "checking if $CC supports -Werror=missing-braces... " >&6; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Werror=missing-braces`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
int
main ()
{
@@ -5437,6 +9199,81 @@ main ()
return 0;
}
_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ 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
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:$LINENO: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -Werror=missing-braces"
+ found="yes"
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if test "${xorg_cv_compiler_flag_unknown_warning_option+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
@@ -5455,109 +9292,847 @@ $as_echo "$ac_try_echo") >&5
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
- ac_cv_prog_cc_g=yes
+ xorg_cv_compiler_flag_unknown_warning_option=yes
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
+ xorg_cv_compiler_flag_unknown_warning_option=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if test "${xorg_cv_compiler_flag_unused_command_line_argument+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ xorg_cv_compiler_flag_unused_command_line_argument=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+found="no"
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ fi
+
+ CFLAGS="$CFLAGS -Werror=sequence-point"
+
+ { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=sequence-point" >&5
+$as_echo_n "checking if $CC supports -Werror=sequence-point... " >&6; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Werror=sequence-point`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ 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
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:$LINENO: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -Werror=sequence-point"
+ found="yes"
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if test "${xorg_cv_compiler_flag_unknown_warning_option+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ xorg_cv_compiler_flag_unknown_warning_option=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ xorg_cv_compiler_flag_unknown_warning_option=no
+fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if test "${xorg_cv_compiler_flag_unused_command_line_argument+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ xorg_cv_compiler_flag_unused_command_line_argument=no
+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:$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
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+found="no"
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ fi
+
+ CFLAGS="$CFLAGS -Werror=return-type"
+
+ { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=return-type" >&5
+$as_echo_n "checking if $CC supports -Werror=return-type... " >&6; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Werror=return-type`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
else
- if test "$GCC" = yes; then
- CFLAGS="-O2"
- else
- CFLAGS=
- fi
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ 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
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
fi
-{ $as_echo "$as_me:$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
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:$LINENO: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -Werror=return-type"
+ found="yes"
+ fi
+ fi
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ fi
+
+ CFLAGS="$CFLAGS -errwarn=E_FUNC_HAS_NO_RETURN_STMT"
+
+ { $as_echo "$as_me:$LINENO: checking if $CC supports -errwarn=E_FUNC_HAS_NO_RETURN_STMT" >&5
+$as_echo_n "checking if $CC supports -errwarn=E_FUNC_HAS_NO_RETURN_STMT... " >&6; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-errwarn=E_FUNC_HAS_NO_RETURN_STMT`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval "test \"\${$as_var+set}\" = set"; }; then
$as_echo_n "(cached) " >&6
else
- ac_cv_prog_cc_c89=no
-ac_save_CC=$CC
-cat >conftest.$ac_ext <<_ACEOF
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <stdarg.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-/* 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;
+int i;
+int
+main ()
{
- return p[i];
+
+ ;
+ return 0;
}
-static char *f (char * (*g) (char **, int), char **p, ...)
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ 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
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:$LINENO: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -errwarn=E_FUNC_HAS_NO_RETURN_STMT"
+ found="yes"
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if test "${xorg_cv_compiler_flag_unknown_warning_option+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ xorg_cv_compiler_flag_unknown_warning_option=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ xorg_cv_compiler_flag_unknown_warning_option=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if test "${xorg_cv_compiler_flag_unused_command_line_argument+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ xorg_cv_compiler_flag_unused_command_line_argument=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+found="no"
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ fi
+
+ CFLAGS="$CFLAGS -Werror=trigraphs"
+
+ { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=trigraphs" >&5
+$as_echo_n "checking if $CC supports -Werror=trigraphs... " >&6; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Werror=trigraphs`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+int
+main ()
{
- char *s;
- va_list v;
- va_start (v,p);
- s = g (p, va_arg (v,int));
- va_end (v);
- return s;
+
+ ;
+ return 0;
}
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ 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
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
-/* 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];
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
-/* 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];
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
-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;
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:$LINENO: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -Werror=trigraphs"
+ found="yes"
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if test "${xorg_cv_compiler_flag_unknown_warning_option+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ xorg_cv_compiler_flag_unknown_warning_option=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ xorg_cv_compiler_flag_unknown_warning_option=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if test "${xorg_cv_compiler_flag_unused_command_line_argument+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ xorg_cv_compiler_flag_unused_command_line_argument=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+found="no"
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ fi
+
+ CFLAGS="$CFLAGS -Werror=array-bounds"
+
+ { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=array-bounds" >&5
+$as_echo_n "checking if $CC supports -Werror=array-bounds... " >&6; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Werror=array-bounds`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
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"
- rm -f conftest.$ac_objext
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ 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
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:$LINENO: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -Werror=array-bounds"
+ found="yes"
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if test "${xorg_cv_compiler_flag_unknown_warning_option+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+_ACEOF
+rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -5575,151 +10150,4199 @@ $as_echo "$ac_try_echo") >&5
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
- ac_cv_prog_cc_c89=$ac_arg
+ xorg_cv_compiler_flag_unknown_warning_option=yes
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
+ xorg_cv_compiler_flag_unknown_warning_option=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
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
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if test "${xorg_cv_compiler_flag_unused_command_line_argument+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ xorg_cv_compiler_flag_unused_command_line_argument=no
fi
-# AC_CACHE_VAL
-case "x$ac_cv_prog_cc_c89" in
- x)
- { $as_echo "$as_me:$LINENO: result: none needed" >&5
-$as_echo "none needed" >&6; } ;;
- xno)
- { $as_echo "$as_me:$LINENO: result: unsupported" >&5
-$as_echo "unsupported" >&6; } ;;
- *)
- CC="$CC $ac_cv_prog_cc_c89"
- { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
-$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+found="no"
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ fi
+
+ CFLAGS="$CFLAGS -Werror=write-strings"
+
+ { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=write-strings" >&5
+$as_echo_n "checking if $CC supports -Werror=write-strings... " >&6; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Werror=write-strings`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ 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
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ eval `$as_echo "$cacheid" | $as_tr_sh`=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
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
-depcc="$CC" am_compiler_list=
-{ $as_echo "$as_me:$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
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:$LINENO: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -Werror=write-strings"
+ found="yes"
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if test "${xorg_cv_compiler_flag_unknown_warning_option+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
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ xorg_cv_compiler_flag_unknown_warning_option=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
- am_cv_CC_dependencies_compiler_type=none
- if test "$am_compiler_list" = ""; then
- am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
- fi
- for depmode in $am_compiler_list; do
- # Setup a source with many dependencies, because some compilers
- # like to wrap large dependency lists on column 80 (with \), and
- # we should not choose a depcomp mode which is confused by this.
- #
- # We need to recreate these files for each test, as the compiler may
- # overwrite some of them when testing with obscure command lines.
- # This happens at least with the AIX C compiler.
- : > sub/conftest.c
- for i in 1 2 3 4 5 6; do
- echo '#include "conftst'$i'.h"' >> sub/conftest.c
- # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
- # Solaris 8's {/usr,}/bin/sh.
- touch sub/conftst$i.h
- done
- echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+ xorg_cv_compiler_flag_unknown_warning_option=no
+fi
- case $depmode in
- nosideeffect)
- # after this tag, mechanisms are not by side-effect, so they'll
- # only be used when explicitly requested
- if test "x$enable_dependency_tracking" = xyes; then
- continue
- else
- break
- fi
- ;;
- none) break ;;
- esac
- # We check with `-c' and `-o' for the sake of the "dashmstdout"
- # mode. It turns out that the SunPro C++ compiler does not properly
- # handle `-M -o', and we need to detect this.
- if depmode=$depmode \
- source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
- depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
- $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
- >/dev/null 2>conftest.err &&
- grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
- grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
- ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
- # icc doesn't choke on unknown options, it will just issue warnings
- # or remarks (even with -Werror). So we grep stderr for any message
- # that says an option was ignored or not supported.
- # When given -MP, icc 7.0 and 7.1 complain thusly:
- # icc: Command line warning: ignoring option '-M'; no argument required
- # The diagnosis changed in icc 8.0:
- # icc: Command line remark: option '-MP' not supported
- if (grep 'ignoring option' conftest.err ||
- grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
- am_cv_CC_dependencies_compiler_type=$depmode
- break
- fi
- fi
- done
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
- cd ..
- rm -rf conftest.dir
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if test "${xorg_cv_compiler_flag_unused_command_line_argument+set}" = set; then
+ $as_echo_n "(cached) " >&6
else
- am_cv_CC_dependencies_compiler_type=none
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ xorg_cv_compiler_flag_unused_command_line_argument=no
fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
fi
-{ $as_echo "$as_me:$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
+found="no"
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
-if
- test "x$enable_dependency_tracking" != xno \
- && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
- am__fastdepCC_TRUE=
- am__fastdepCC_FALSE='#'
+ if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ fi
+
+ CFLAGS="$CFLAGS -Werror=address"
+
+ { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=address" >&5
+$as_echo_n "checking if $CC supports -Werror=address... " >&6; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Werror=address`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
else
- am__fastdepCC_TRUE='#'
- am__fastdepCC_FALSE=
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ 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
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:$LINENO: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -Werror=address"
+ found="yes"
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if test "${xorg_cv_compiler_flag_unknown_warning_option+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ xorg_cv_compiler_flag_unknown_warning_option=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ xorg_cv_compiler_flag_unknown_warning_option=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if test "${xorg_cv_compiler_flag_unused_command_line_argument+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ xorg_cv_compiler_flag_unused_command_line_argument=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+found="no"
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ fi
+
+ CFLAGS="$CFLAGS -Werror=int-to-pointer-cast"
+
+ { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=int-to-pointer-cast" >&5
+$as_echo_n "checking if $CC supports -Werror=int-to-pointer-cast... " >&6; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Werror=int-to-pointer-cast`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ 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
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:$LINENO: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -Werror=int-to-pointer-cast"
+ found="yes"
+ fi
+ fi
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ fi
+
+ CFLAGS="$CFLAGS -errwarn=E_BAD_PTR_INT_COMBINATION"
+
+ { $as_echo "$as_me:$LINENO: checking if $CC supports -errwarn=E_BAD_PTR_INT_COMBINATION" >&5
+$as_echo_n "checking if $CC supports -errwarn=E_BAD_PTR_INT_COMBINATION... " >&6; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-errwarn=E_BAD_PTR_INT_COMBINATION`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ 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
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:$LINENO: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -errwarn=E_BAD_PTR_INT_COMBINATION"
+ found="yes"
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if test "${xorg_cv_compiler_flag_unknown_warning_option+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ xorg_cv_compiler_flag_unknown_warning_option=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ xorg_cv_compiler_flag_unknown_warning_option=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if test "${xorg_cv_compiler_flag_unused_command_line_argument+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ xorg_cv_compiler_flag_unused_command_line_argument=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+found="no"
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ fi
+
+ CFLAGS="$CFLAGS -Werror=pointer-to-int-cast"
+
+ { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=pointer-to-int-cast" >&5
+$as_echo_n "checking if $CC supports -Werror=pointer-to-int-cast... " >&6; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Werror=pointer-to-int-cast`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ 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
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:$LINENO: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -Werror=pointer-to-int-cast"
+ found="yes"
+ fi
+ fi
+
+ # Also -errwarn=E_BAD_PTR_INT_COMBINATION
+else
+{ $as_echo "$as_me:$LINENO: WARNING: You have chosen not to turn some select compiler warnings into errors. This should not be necessary. Please report why you needed to do so in a bug report at $PACKAGE_BUGREPORT" >&5
+$as_echo "$as_me: WARNING: You have chosen not to turn some select compiler warnings into errors. This should not be necessary. Please report why you needed to do so in a bug report at $PACKAGE_BUGREPORT" >&2;}
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if test "${xorg_cv_compiler_flag_unknown_warning_option+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ xorg_cv_compiler_flag_unknown_warning_option=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ xorg_cv_compiler_flag_unknown_warning_option=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if test "${xorg_cv_compiler_flag_unused_command_line_argument+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ xorg_cv_compiler_flag_unused_command_line_argument=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+found="no"
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ fi
+
+ CFLAGS="$CFLAGS -Wimplicit"
+
+ { $as_echo "$as_me:$LINENO: checking if $CC supports -Wimplicit" >&5
+$as_echo_n "checking if $CC supports -Wimplicit... " >&6; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Wimplicit`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ 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
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:$LINENO: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -Wimplicit"
+ found="yes"
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if test "${xorg_cv_compiler_flag_unknown_warning_option+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ xorg_cv_compiler_flag_unknown_warning_option=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ xorg_cv_compiler_flag_unknown_warning_option=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if test "${xorg_cv_compiler_flag_unused_command_line_argument+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ xorg_cv_compiler_flag_unused_command_line_argument=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+found="no"
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ fi
+
+ CFLAGS="$CFLAGS -Wnonnull"
+
+ { $as_echo "$as_me:$LINENO: checking if $CC supports -Wnonnull" >&5
+$as_echo_n "checking if $CC supports -Wnonnull... " >&6; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Wnonnull`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ 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
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:$LINENO: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -Wnonnull"
+ found="yes"
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if test "${xorg_cv_compiler_flag_unknown_warning_option+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ xorg_cv_compiler_flag_unknown_warning_option=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ xorg_cv_compiler_flag_unknown_warning_option=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if test "${xorg_cv_compiler_flag_unused_command_line_argument+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ xorg_cv_compiler_flag_unused_command_line_argument=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+found="no"
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ fi
+
+ CFLAGS="$CFLAGS -Winit-self"
+
+ { $as_echo "$as_me:$LINENO: checking if $CC supports -Winit-self" >&5
+$as_echo_n "checking if $CC supports -Winit-self... " >&6; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Winit-self`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ 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
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:$LINENO: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -Winit-self"
+ found="yes"
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if test "${xorg_cv_compiler_flag_unknown_warning_option+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ xorg_cv_compiler_flag_unknown_warning_option=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ xorg_cv_compiler_flag_unknown_warning_option=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if test "${xorg_cv_compiler_flag_unused_command_line_argument+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ xorg_cv_compiler_flag_unused_command_line_argument=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+found="no"
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ fi
+
+ CFLAGS="$CFLAGS -Wmain"
+
+ { $as_echo "$as_me:$LINENO: checking if $CC supports -Wmain" >&5
+$as_echo_n "checking if $CC supports -Wmain... " >&6; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Wmain`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ 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
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:$LINENO: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -Wmain"
+ found="yes"
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if test "${xorg_cv_compiler_flag_unknown_warning_option+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ xorg_cv_compiler_flag_unknown_warning_option=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ xorg_cv_compiler_flag_unknown_warning_option=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if test "${xorg_cv_compiler_flag_unused_command_line_argument+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ xorg_cv_compiler_flag_unused_command_line_argument=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+found="no"
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ fi
+
+ CFLAGS="$CFLAGS -Wmissing-braces"
+
+ { $as_echo "$as_me:$LINENO: checking if $CC supports -Wmissing-braces" >&5
+$as_echo_n "checking if $CC supports -Wmissing-braces... " >&6; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Wmissing-braces`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ 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
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
fi
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:$LINENO: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -Wmissing-braces"
+ found="yes"
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if test "${xorg_cv_compiler_flag_unknown_warning_option+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ xorg_cv_compiler_flag_unknown_warning_option=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ xorg_cv_compiler_flag_unknown_warning_option=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if test "${xorg_cv_compiler_flag_unused_command_line_argument+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ xorg_cv_compiler_flag_unused_command_line_argument=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+found="no"
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ fi
+
+ CFLAGS="$CFLAGS -Wsequence-point"
+
+ { $as_echo "$as_me:$LINENO: checking if $CC supports -Wsequence-point" >&5
+$as_echo_n "checking if $CC supports -Wsequence-point... " >&6; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Wsequence-point`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ 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
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:$LINENO: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -Wsequence-point"
+ found="yes"
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if test "${xorg_cv_compiler_flag_unknown_warning_option+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ xorg_cv_compiler_flag_unknown_warning_option=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ xorg_cv_compiler_flag_unknown_warning_option=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if test "${xorg_cv_compiler_flag_unused_command_line_argument+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ xorg_cv_compiler_flag_unused_command_line_argument=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+found="no"
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ fi
+
+ CFLAGS="$CFLAGS -Wreturn-type"
+
+ { $as_echo "$as_me:$LINENO: checking if $CC supports -Wreturn-type" >&5
+$as_echo_n "checking if $CC supports -Wreturn-type... " >&6; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Wreturn-type`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ 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
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:$LINENO: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -Wreturn-type"
+ found="yes"
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if test "${xorg_cv_compiler_flag_unknown_warning_option+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ xorg_cv_compiler_flag_unknown_warning_option=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ xorg_cv_compiler_flag_unknown_warning_option=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if test "${xorg_cv_compiler_flag_unused_command_line_argument+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ xorg_cv_compiler_flag_unused_command_line_argument=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+found="no"
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ fi
+
+ CFLAGS="$CFLAGS -Wtrigraphs"
+
+ { $as_echo "$as_me:$LINENO: checking if $CC supports -Wtrigraphs" >&5
+$as_echo_n "checking if $CC supports -Wtrigraphs... " >&6; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Wtrigraphs`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ 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
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:$LINENO: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -Wtrigraphs"
+ found="yes"
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if test "${xorg_cv_compiler_flag_unknown_warning_option+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ xorg_cv_compiler_flag_unknown_warning_option=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ xorg_cv_compiler_flag_unknown_warning_option=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if test "${xorg_cv_compiler_flag_unused_command_line_argument+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ xorg_cv_compiler_flag_unused_command_line_argument=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+found="no"
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ fi
+
+ CFLAGS="$CFLAGS -Warray-bounds"
+
+ { $as_echo "$as_me:$LINENO: checking if $CC supports -Warray-bounds" >&5
+$as_echo_n "checking if $CC supports -Warray-bounds... " >&6; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Warray-bounds`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ 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
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:$LINENO: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -Warray-bounds"
+ found="yes"
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if test "${xorg_cv_compiler_flag_unknown_warning_option+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ xorg_cv_compiler_flag_unknown_warning_option=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ xorg_cv_compiler_flag_unknown_warning_option=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if test "${xorg_cv_compiler_flag_unused_command_line_argument+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ xorg_cv_compiler_flag_unused_command_line_argument=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+found="no"
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ fi
+
+ CFLAGS="$CFLAGS -Wwrite-strings"
+
+ { $as_echo "$as_me:$LINENO: checking if $CC supports -Wwrite-strings" >&5
+$as_echo_n "checking if $CC supports -Wwrite-strings... " >&6; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Wwrite-strings`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ 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
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:$LINENO: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -Wwrite-strings"
+ found="yes"
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if test "${xorg_cv_compiler_flag_unknown_warning_option+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ xorg_cv_compiler_flag_unknown_warning_option=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ xorg_cv_compiler_flag_unknown_warning_option=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if test "${xorg_cv_compiler_flag_unused_command_line_argument+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ xorg_cv_compiler_flag_unused_command_line_argument=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+found="no"
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ fi
+
+ CFLAGS="$CFLAGS -Waddress"
+
+ { $as_echo "$as_me:$LINENO: checking if $CC supports -Waddress" >&5
+$as_echo_n "checking if $CC supports -Waddress... " >&6; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Waddress`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ 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
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:$LINENO: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -Waddress"
+ found="yes"
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if test "${xorg_cv_compiler_flag_unknown_warning_option+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ xorg_cv_compiler_flag_unknown_warning_option=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ xorg_cv_compiler_flag_unknown_warning_option=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if test "${xorg_cv_compiler_flag_unused_command_line_argument+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ xorg_cv_compiler_flag_unused_command_line_argument=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+found="no"
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ fi
+
+ CFLAGS="$CFLAGS -Wint-to-pointer-cast"
+
+ { $as_echo "$as_me:$LINENO: checking if $CC supports -Wint-to-pointer-cast" >&5
+$as_echo_n "checking if $CC supports -Wint-to-pointer-cast... " >&6; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Wint-to-pointer-cast`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ 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
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:$LINENO: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -Wint-to-pointer-cast"
+ found="yes"
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if test "${xorg_cv_compiler_flag_unknown_warning_option+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ xorg_cv_compiler_flag_unknown_warning_option=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ xorg_cv_compiler_flag_unknown_warning_option=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if test "${xorg_cv_compiler_flag_unused_command_line_argument+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ xorg_cv_compiler_flag_unused_command_line_argument=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+found="no"
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ fi
+
+ CFLAGS="$CFLAGS -Wpointer-to-int-cast"
+
+ { $as_echo "$as_me:$LINENO: checking if $CC supports -Wpointer-to-int-cast" >&5
+$as_echo_n "checking if $CC supports -Wpointer-to-int-cast... " >&6; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Wpointer-to-int-cast`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ 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
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:$LINENO: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -Wpointer-to-int-cast"
+ found="yes"
+ fi
+ fi
+
+
+fi
+
+
+
+
+
+
+
+ CWARNFLAGS="$BASE_CFLAGS"
+ if test "x$GCC" = xyes ; then
+ CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing"
+ fi
+
+
+
+
+
+
+
+
+# Check whether --enable-strict-compilation was given.
+if test "${enable_strict_compilation+set}" = set; then
+ enableval=$enable_strict_compilation; STRICT_COMPILE=$enableval
+else
+ STRICT_COMPILE=no
+fi
+
+
+
+
+
+
+STRICT_CFLAGS=""
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if test "${xorg_cv_compiler_flag_unknown_warning_option+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ xorg_cv_compiler_flag_unknown_warning_option=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ xorg_cv_compiler_flag_unknown_warning_option=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if test "${xorg_cv_compiler_flag_unused_command_line_argument+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ xorg_cv_compiler_flag_unused_command_line_argument=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+found="no"
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ fi
+
+ CFLAGS="$CFLAGS -pedantic"
+
+ { $as_echo "$as_me:$LINENO: checking if $CC supports -pedantic" >&5
+$as_echo_n "checking if $CC supports -pedantic... " >&6; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-pedantic`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ 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
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:$LINENO: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ STRICT_CFLAGS="$STRICT_CFLAGS -pedantic"
+ found="yes"
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if test "${xorg_cv_compiler_flag_unknown_warning_option+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ xorg_cv_compiler_flag_unknown_warning_option=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ xorg_cv_compiler_flag_unknown_warning_option=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if test "${xorg_cv_compiler_flag_unused_command_line_argument+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ xorg_cv_compiler_flag_unused_command_line_argument=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+found="no"
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ fi
+
+ CFLAGS="$CFLAGS -Werror"
+
+ { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror" >&5
+$as_echo_n "checking if $CC supports -Werror... " >&6; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Werror`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ 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
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:$LINENO: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ STRICT_CFLAGS="$STRICT_CFLAGS -Werror"
+ found="yes"
+ fi
+ fi
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ fi
+
+ CFLAGS="$CFLAGS -errwarn"
+
+ { $as_echo "$as_me:$LINENO: checking if $CC supports -errwarn" >&5
+$as_echo_n "checking if $CC supports -errwarn... " >&6; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-errwarn`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ 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
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:$LINENO: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ STRICT_CFLAGS="$STRICT_CFLAGS -errwarn"
+ found="yes"
+ fi
+ fi
+
+
+
+# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not
+# activate it with -Werror, so we add it here explicitly.
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if test "${xorg_cv_compiler_flag_unknown_warning_option+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ xorg_cv_compiler_flag_unknown_warning_option=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ xorg_cv_compiler_flag_unknown_warning_option=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:$LINENO: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if test "${xorg_cv_compiler_flag_unused_command_line_argument+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ xorg_cv_compiler_flag_unused_command_line_argument=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+found="no"
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ fi
+
+ CFLAGS="$CFLAGS -Werror=attributes"
+
+ { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=attributes" >&5
+$as_echo_n "checking if $CC supports -Werror=attributes... " >&6; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Werror=attributes`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ 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
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:$LINENO: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ STRICT_CFLAGS="$STRICT_CFLAGS -Werror=attributes"
+ found="yes"
+ fi
+ fi
+
+
+
+if test "x$STRICT_COMPILE" = "xyes"; then
+ BASE_CFLAGS="$BASE_CFLAGS $STRICT_CFLAGS"
+ CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
+fi
+
+
+
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION_MAJOR `echo $PACKAGE_VERSION | cut -d . -f 1`
+_ACEOF
+
+ PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
+ if test "x$PVM" = "x"; then
+ PVM="0"
+ fi
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION_MINOR $PVM
+_ACEOF
+
+ PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
+ if test "x$PVP" = "x"; then
+ PVP="0"
+ fi
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION_PATCHLEVEL $PVP
+_ACEOF
+
+
+
+CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \
+mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \
+|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \
+echo 'git directory not found: installing possibly empty changelog.' >&2)"
+
+
+
+
+macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros`
+INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \
+mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \
+|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \
+echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)"
+
+
+
+
+
+
+if test x$APP_MAN_SUFFIX = x ; then
+ APP_MAN_SUFFIX=1
+fi
+if test x$APP_MAN_DIR = x ; then
+ APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
+fi
+
+if test x$LIB_MAN_SUFFIX = x ; then
+ LIB_MAN_SUFFIX=3
+fi
+if test x$LIB_MAN_DIR = x ; then
+ LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
+fi
+
+if test x$FILE_MAN_SUFFIX = x ; then
+ case $host_os in
+ solaris*) FILE_MAN_SUFFIX=4 ;;
+ *) FILE_MAN_SUFFIX=5 ;;
+ esac
+fi
+if test x$FILE_MAN_DIR = x ; then
+ FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
+fi
+
+if test x$MISC_MAN_SUFFIX = x ; then
+ case $host_os in
+ solaris*) MISC_MAN_SUFFIX=5 ;;
+ *) MISC_MAN_SUFFIX=7 ;;
+ esac
+fi
+if test x$MISC_MAN_DIR = x ; then
+ MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
+fi
+
+if test x$DRIVER_MAN_SUFFIX = x ; then
+ case $host_os in
+ solaris*) DRIVER_MAN_SUFFIX=7 ;;
+ *) DRIVER_MAN_SUFFIX=4 ;;
+ esac
+fi
+if test x$DRIVER_MAN_DIR = x ; then
+ DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
+fi
+
+if test x$ADMIN_MAN_SUFFIX = x ; then
+ case $host_os in
+ solaris*) ADMIN_MAN_SUFFIX=1m ;;
+ *) ADMIN_MAN_SUFFIX=8 ;;
+ esac
+fi
+if test x$ADMIN_MAN_DIR = x ; then
+ ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+XORG_MAN_PAGE="X Version 11"
+
+MAN_SUBSTS="\
+ -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
+ -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
+ -e 's|__xservername__|Xorg|g' \
+ -e 's|__xconfigfile__|xorg.conf|g' \
+ -e 's|__projectroot__|\$(prefix)|g' \
+ -e 's|__apploaddir__|\$(appdefaultdir)|g' \
+ -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \
+ -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \
+ -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \
+ -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \
+ -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \
+ -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'"
+
+
+
+AM_DEFAULT_VERBOSITY=1
+
+
+
if test "x$CC" != xcc; then
{ $as_echo "$as_me:$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; }
@@ -5850,103 +14473,294 @@ if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then
CC="$am_aux_dir/compile $CC"
fi
-# 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:$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
+
+
+for ac_func in mkstemp
+do
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+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
- ;;
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* 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 $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
+int
+main ()
+{
+return $ac_func ();
+ ;
+ return 0;
+}
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ 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
+ eval "$as_ac_var=yes"
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
-done
-IFS=$as_save_IFS
+ eval "$as_ac_var=no"
+fi
-rm -rf conftest.one conftest.two conftest.dir
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if test `eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL=$ac_cv_path_install
+done
+
+
+# Math libraries & functions
+# - some compilers use builtin inlines for floor when optimizing
+# - lrint() is a C99 addition not found on some older systems
+# - must do the libm check first so that the lrint check will have it in $LIBS
+save_LIBS="$LIBS"
+{ $as_echo "$as_me:$LINENO: checking for library containing floor" >&5
+$as_echo_n "checking for library containing floor... " >&6; }
+if test "${ac_cv_search_floor+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any 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 floor ();
+int
+main ()
+{
+return floor ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' m; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
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
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
+ 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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ 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_cv_search_floor=$ac_res
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
fi
-{ $as_echo "$as_me:$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}'
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext
+ if test "${ac_cv_search_floor+set}" = set; then
+ break
+fi
+done
+if test "${ac_cv_search_floor+set}" = set; then
+ :
+else
+ ac_cv_search_floor=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_floor" >&5
+$as_echo "$ac_cv_search_floor" >&6; }
+ac_res=$ac_cv_search_floor
+if test "$ac_res" != no; then
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+fi
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+{ $as_echo "$as_me:$LINENO: checking for library containing lrint" >&5
+$as_echo_n "checking for library containing lrint... " >&6; }
+if test "${ac_cv_search_lrint+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any 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 lrint ();
+int
+main ()
+{
+return lrint ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' m; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ 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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ 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_cv_search_lrint=$ac_res
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
-{ $as_echo "$as_me:$LINENO: checking for mkstemp" >&5
-$as_echo_n "checking for mkstemp... " >&6; }
-if test "${ac_cv_func_mkstemp+set}" = set; then
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext
+ if test "${ac_cv_search_lrint+set}" = set; then
+ break
+fi
+done
+if test "${ac_cv_search_lrint+set}" = set; then
+ :
+else
+ ac_cv_search_lrint=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_lrint" >&5
+$as_echo "$ac_cv_search_lrint" >&6; }
+ac_res=$ac_cv_search_lrint
+if test "$ac_res" != no; then
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+fi
+
+
+for ac_func in lrint
+do
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
$as_echo_n "(cached) " >&6
else
cat >conftest.$ac_ext <<_ACEOF
@@ -5955,12 +14769,12 @@ _ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-/* Define mkstemp to an innocuous variant, in case <limits.h> declares mkstemp.
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define mkstemp innocuous_mkstemp
+#define $ac_func innocuous_$ac_func
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char mkstemp (); below.
+ which can conflict with char $ac_func (); below.
Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
<limits.h> exists even on freestanding compilers. */
@@ -5970,7 +14784,7 @@ cat >>conftest.$ac_ext <<_ACEOF
# include <assert.h>
#endif
-#undef mkstemp
+#undef $ac_func
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
@@ -5978,18 +14792,18 @@ cat >>conftest.$ac_ext <<_ACEOF
#ifdef __cplusplus
extern "C"
#endif
-char mkstemp ();
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
-#if defined __stub_mkstemp || defined __stub___mkstemp
+#if defined __stub_$ac_func || defined __stub___$ac_func
choke me
#endif
int
main ()
{
-return mkstemp ();
+return $ac_func ();
;
return 0;
}
@@ -6015,30 +14829,36 @@ $as_echo "$ac_try_echo") >&5
test "$cross_compiling" = yes ||
$as_test_x conftest$ac_exeext
}; then
- ac_cv_func_mkstemp=yes
+ eval "$as_ac_var=yes"
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_cv_func_mkstemp=no
+ eval "$as_ac_var=no"
fi
rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_mkstemp" >&5
-$as_echo "$ac_cv_func_mkstemp" >&6; }
-if test $ac_cv_func_mkstemp = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAS_MKSTEMP 1
+ac_res=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if test `eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
fi
+done
+MATH_LIBS="$LIBS"
+LIBS="$save_LIBS"
-# Obtain compiler/linker options from depedencies
+
+# Obtain compiler/linker options from dependencies
pkg_failed=no
{ $as_echo "$as_me:$LINENO: checking for BMTOA" >&5
@@ -6160,12 +14980,12 @@ if test -n "$PKG_CONFIG"; then
pkg_cv_ATOBM_CFLAGS="$ATOBM_CFLAGS"
else
if test -n "$PKG_CONFIG" && \
- { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11\"") >&5
- ($PKG_CONFIG --exists --print-errors "x11") 2>&5
+ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xproto\"") >&5
+ ($PKG_CONFIG --exists --print-errors "xproto") 2>&5
ac_status=$?
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
- pkg_cv_ATOBM_CFLAGS=`$PKG_CONFIG --cflags "x11" 2>/dev/null`
+ pkg_cv_ATOBM_CFLAGS=`$PKG_CONFIG --cflags "xproto" 2>/dev/null`
else
pkg_failed=yes
fi
@@ -6178,12 +14998,12 @@ if test -n "$PKG_CONFIG"; then
pkg_cv_ATOBM_LIBS="$ATOBM_LIBS"
else
if test -n "$PKG_CONFIG" && \
- { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11\"") >&5
- ($PKG_CONFIG --exists --print-errors "x11") 2>&5
+ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xproto\"") >&5
+ ($PKG_CONFIG --exists --print-errors "xproto") 2>&5
ac_status=$?
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
- pkg_cv_ATOBM_LIBS=`$PKG_CONFIG --libs "x11" 2>/dev/null`
+ pkg_cv_ATOBM_LIBS=`$PKG_CONFIG --libs "xproto" 2>/dev/null`
else
pkg_failed=yes
fi
@@ -6202,14 +15022,14 @@ else
_pkg_short_errors_supported=no
fi
if test $_pkg_short_errors_supported = yes; then
- ATOBM_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "x11"`
+ ATOBM_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xproto"`
else
- ATOBM_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11"`
+ ATOBM_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xproto"`
fi
# Put the nasty error message in config.log where it belongs
echo "$ATOBM_PKG_ERRORS" >&5
- { { $as_echo "$as_me:$LINENO: error: Package requirements (x11) were not met:
+ { { $as_echo "$as_me:$LINENO: error: Package requirements (xproto) were not met:
$ATOBM_PKG_ERRORS
@@ -6220,7 +15040,7 @@ Alternatively, you may set the environment variables ATOBM_CFLAGS
and ATOBM_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
" >&5
-$as_echo "$as_me: error: Package requirements (x11) were not met:
+$as_echo "$as_me: error: Package requirements (xproto) were not met:
$ATOBM_PKG_ERRORS
@@ -6615,13 +15435,6 @@ $as_echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
-if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
- { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-$as_echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
- { (exit 1); exit 1; }; }
-fi
: ${CONFIG_STATUS=./config.status}
ac_write_fail=0
@@ -6944,7 +15757,7 @@ exec 6>&1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by bitmap $as_me 1.0.5, which was
+This file was extended by bitmap $as_me 1.0.6, which was
generated by GNU Autoconf 2.62. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -6997,7 +15810,7 @@ Report bugs to <bug-autoconf@gnu.org>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\
-bitmap config.status 1.0.5
+bitmap config.status 1.0.6
configured by $0, generated by GNU Autoconf 2.62,
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
@@ -7119,8 +15932,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
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" ;;
+ "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
"man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
diff --git a/app/bitmap/configure.ac b/app/bitmap/configure.ac
index 634fa9c4d..e9b4699d6 100644
--- a/app/bitmap/configure.ac
+++ b/app/bitmap/configure.ac
@@ -1,6 +1,6 @@
dnl Copyright 2005 Red Hat, Inc.
-dnl
+dnl
dnl Permission to use, copy, modify, distribute, and sell this software and its
dnl documentation for any purpose is hereby granted without fee, provided that
dnl the above copyright notice appear in all copies and that both that
@@ -10,7 +10,7 @@ dnl advertising or publicity pertaining to distribution of the software without
dnl specific, written prior permission. Red Hat makes no
dnl representations about the suitability of this software for any purpose. It
dnl is provided "as is" without express or implied warranty.
-dnl
+dnl
dnl RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
dnl INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
dnl EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
@@ -21,9 +21,14 @@ dnl PERFORMANCE OF THIS SOFTWARE.
dnl
dnl Process this file with autoconf to create configure.
+# Initialize Autoconf
AC_PREREQ([2.60])
-AC_INIT([bitmap], [1.0.5],
+AC_INIT([bitmap], [1.0.6],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [bitmap])
+AC_CONFIG_SRCDIR([Makefile.am])
+AC_CONFIG_HEADERS([config.h])
+
+# Initialize Automake
AM_INIT_AUTOMAKE([foreign dist-bzip2])
AM_MAINTAINER_MODE
@@ -33,24 +38,31 @@ m4_ifndef([XORG_MACROS_VERSION],
XORG_MACROS_VERSION(1.8)
XORG_DEFAULT_OPTIONS
-AM_CONFIG_HEADER(config.h)
-
-AC_PROG_CC
AM_PROG_CC_C_O
-AC_PROG_INSTALL
-AC_CHECK_FUNC([mkstemp],
- AC_DEFINE(HAS_MKSTEMP,1,[Define to 1 if you have the "mkstemp" function.]))
+AC_CHECK_FUNCS([mkstemp])
+
+# Math libraries & functions
+# - some compilers use builtin inlines for floor when optimizing
+# - lrint() is a C99 addition not found on some older systems
+# - must do the libm check first so that the lrint check will have it in $LIBS
+save_LIBS="$LIBS"
+AC_SEARCH_LIBS([floor], [m])
+AC_SEARCH_LIBS([lrint], [m])
+AC_CHECK_FUNCS([lrint])
+MATH_LIBS="$LIBS"
+LIBS="$save_LIBS"
+AC_SUBST([MATH_LIBS])
-# Obtain compiler/linker options from depedencies
+# Obtain compiler/linker options from dependencies
PKG_CHECK_MODULES(BMTOA, x11 xmu)
-PKG_CHECK_MODULES(ATOBM, x11)
+PKG_CHECK_MODULES(ATOBM, xproto)
PKG_CHECK_MODULES(BITMAP, xbitmaps xaw7 xmu)
PKG_CHECK_MODULES(APPDEFS, xt)
xt_appdefaultdir=`$PKG_CONFIG --variable=appdefaultdir xt`
AC_ARG_WITH(appdefaultdir,
- AC_HELP_STRING([--with-appdefaultdir=<pathname>],
+ AS_HELP_STRING([--with-appdefaultdir=<pathname>],
[specify directory for app-defaults files (default is autodetected)]),
[appdefaultdir="$withval"], [appdefaultdir="${xt_appdefaultdir}"])
AC_SUBST(appdefaultdir)
diff --git a/app/bitmap/man/Makefile.in b/app/bitmap/man/Makefile.in
index db7f69538..e39fbeeea 100644
--- a/app/bitmap/man/Makefile.in
+++ b/app/bitmap/man/Makefile.in
@@ -46,9 +46,9 @@ pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
+install_sh_DATA = ${SHELL} $(install_sh) -c -m 644
+install_sh_PROGRAM = ${SHELL} $(install_sh) -c
+install_sh_SCRIPT = ${SHELL} $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
@@ -97,6 +97,7 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BASE_CFLAGS = @BASE_CFLAGS@
BITMAP_CFLAGS = @BITMAP_CFLAGS@
BITMAP_LIBS = @BITMAP_LIBS@
BMTOA_CFLAGS = @BMTOA_CFLAGS@
@@ -137,6 +138,7 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
MAN_SUBSTS = @MAN_SUBSTS@
+MATH_LIBS = @MATH_LIBS@
MISC_MAN_DIR = @MISC_MAN_DIR@
MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
OBJEXT = @OBJEXT@
@@ -151,6 +153,7 @@ PKG_CONFIG = @PKG_CONFIG@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
+STRICT_CFLAGS = @STRICT_CFLAGS@
STRIP = @STRIP@
VERSION = @VERSION@
XORG_MAN_PAGE = @XORG_MAN_PAGE@
diff --git a/app/bitmap/man/bitmap.man b/app/bitmap/man/bitmap.man
index 3b5d585cc..f04cfcffd 100644
--- a/app/bitmap/man/bitmap.man
+++ b/app/bitmap/man/bitmap.man
@@ -70,7 +70,7 @@ FORMAT) to and from ASCII strings. They are most commonly used to
quickly print out bitmaps and to generate versions for including in text.
.SH COMMAND LINE OPTIONS
\fIBitmap\fP supports the standard X Toolkit command line arguments
-(see \fIX\fP(1)). The following additional arguments are supported as well.
+(see \fIX\fP(__miscmansuffix__)). The following additional arguments are supported as well.
.TP 4
.B \-size\fI WIDTHxHEIGHT\fP
Specifies size of the grid in squares.