Complete.Org: Mailing Lists: Archives: freeciv-dev: November 1998:
[Freeciv-Dev] ./configure does work on Solaris (was: Silliness in FC_CHE
Home

[Freeciv-Dev] ./configure does work on Solaris (was: Silliness in FC_CHE

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx (Freeciv developers)
Subject: [Freeciv-Dev] ./configure does work on Solaris (was: Silliness in FC_CHECK_X_LIB)
From: Reinier Post <rp@xxxxxxxxxx>
Date: Sun, 22 Nov 1998 02:58:02 +0100

  Greg & others,

> > dnl FC_CHECK_X_LIB(LIBRARY, FUNCTION [, ACTION-IF-FOUND [,
> > dnl   ACTION-IF-NOT-FOUND]])
> > dnl
> > dnl This macro is intended to search for X11-related libraries.  It takes 
> > the
> > dnl following variables for input:
> > dnl   LIBS              -- prefixed to all linker lines
> > dnl   X_LIBS            -- prefixed to all linker lines (after LIBS)
> > dnl   X_EXTRA_LIBS      -- suffixed to all linker lines
> > dnl Thus, the trial linker line will be "$LIBS $X_LIBS -l$1 $X_EXTRA_LIBS".
> 
> I wrote that, based on AC_CHECK_LIB, after much trial and error.  I
> take responsibility for any problems with it that aren't also present
> in AC_CHECK_LIB.

[snip - detailed explanation of the situation - much appreciated!]

The list has been notified over time of my previous blunderings into
./configure country.  It turns out my problem was poor testing: the
Xpm library is in /usr/local/lib on our system, but what I had missed
was a broken libnsl in the same directory!

I can now ./configure and compile the Nov 20 CVS version, both with and
without the patch you attached.  The 'vanilla' 171 version doesn't
./configure yet.  My recipe:

% setenv PATH [...]  # to include GNU make and gcc
% setenv LDFLAGS '-L/path/to/xpm/lib -R /path/to/xpm/lib'
% ./configure  # using Sun's ANSI cc, which is no problem here
% make CC=gcc

There is still room for improvement:

 1) GNU make is required   (as reported to the list earlier)
 2) gcc is required

Vanilla 171 compiled successfully with Sun make and Sun's ANSI cc,
if the xmkmf method was used.

 3) xmkmf is broken now: 'make' compiles client/resources.o and stops there

This is due to the Imakefile patch I sent earlier.  Appaerntly the Imakefile
changed length and the extra target is now the first target, instead of 'all'.
The attached patch fixes the problem.

  4) xmkmf no longer works with Sun's ANSI cc:

makedepend  -s "# DO NOT DELETE" -- -Iserver -Iclient -Icommon -Iai 
-I/usr/include/X11  -I/usr/openwin/include  -DSVR4 -DSYSV    --
cc -O -xF -DSYSV -DSVR4 -xF -Wa,-cg92 -Iserver -Iclient -Icommon -Iai 
-I/usr/include/X11  -I/usr/openwin/include  -DSVR4 -DSYSV    -c 
client/helpdlg.c -o client/helpdlg.o
"client/helpdlg.c", line 330: syntax error before or at: }
"client/helpdlg.c", line 377: syntax error before or at: void
"client/helpdlg.c", line 384: undefined symbol: width
"client/helpdlg.c", line 384: undefined symbol: height
"client/helpdlg.c", line 386: undefined symbol: x
"client/helpdlg.c", line 386: undefined symbol: y
"client/helpdlg.c", line 392: undefined symbol: item
"client/helpdlg.c", line 392: undefined symbol: htype
"client/helpdlg.c", line 392: warning: improper pointer/integer combination: 
arg #1
cc: acomp failed for client/helpdlg.c
*** Error code 2

Some uninformed attempts to use xmkmf with gcc on ths system all failed.

It would be nice to have a freeciv-1.7.2 that compiles with only Sun-supplied
software  - like 1.7.1 and most versions before it -  although Solaris boxes
without gcc and/or GNU make that run freeciv are probably hard to find.

--
Reinier Post

Attachment: Imakefile.diff-c
Description: Text document


[Prev in Thread] Current Thread [Next in Thread]