Re: [wmii] snap: 20060316 -- compilation on Solaris

From: Stefan Tibus <sjti_AT_gmx.net>
Date: Thu, 16 Mar 2006 11:48:33 +0100

Two small things to compile well on Solaris using Sun Studio:

Insert #include <X11/Xlib.h> before #include <X11/Xutil.h> in
cmd/wm/fs.c.

Like the programs in cmd/wm wmiir in cmd need -lsocket and -lnsl,
so I changed config.mk to the following:
----------
# Customize to fit your system

# paths
PREFIX = /usr/local
CONFPREFIX = ${PREFIX}/etc
MANPREFIX = ${PREFIX}/share/man

X11INC = /usr/X11R6/include
X11LIB = /usr/X11R6/lib

VERSION = 20060316

# includes and libs
LIBS = -L${PREFIX}/lib -L/usr/lib -lc -lm -L${X11LIB} -lX11

# GCC
# Note: - under Solaris add -D__EXTENSIONS__ to CFLAGS
#CFLAGS = -g -Wall -I. -I${PREFIX}/include -I/usr/include -I${X11INC} \
# -DVERSION=\"${VERSION}\"
#LDFLAGS = -g ${LIBS}

# Sun Studio on Solaris
CFLAGS = -fast -xtarget=ultra ${INCLUDES} -DVERSION=\"${VERSION}\"
LIBS += -lsocket -lnsl
LDFLAGS = ${LIBS}

AR = ar cr
CC = cc
RANLIB = ranlib
----------

No further changes are required in the makefiles then. (And I
suppose gcc on Solaris is happy with the same options as on
Linux, BSD or whatever.)

Regards,
Stefan
Received on Thu Mar 16 2006 - 11:49:05 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 16:01:16 UTC