Build freeglut on OpenSolaris
This is another post regarding build open source stuff on OpenSolaris 2008.05, serve as a personal note, and maybe save some time for others.
This time, the candidate is freeglut. As usual, I like the latest stuff, so I check out the code directly from svn.
$ svn co https://freeglut.svn.sourceforge.net/svnroot/freeglut/trunk freeglut-trunk
A quick configure reveals I better to have need Xlib.h and xf86vmode.h, do a pkg search to see if a package is available for those:
$ pfexec pkg search -r Xlib.h
INDEX ACTION VALUE PACKAGE
basename file usr/X11/include/X11/Xlib.h pkg:/FSWxorg-headers-AT-0.5.11-0-DOT-79
basename file usr/X11/include/X11/Xlib.h pkg:/FSWxorg-headers-AT-0.5.11-0-DOT-75
basename file usr/X11/include/X11/Xlib.h pkg:/SUNWxwinc-AT-0.5.11-0-DOT-86
basename file usr/X11/include/X11/Xlib.h pkg:/SUNWxwinc-AT-0.5.11-0-DOT-86
$ pfexec pkg search -r xf86vmode.h
INDEX ACTION VALUE PACKAGE
basename file usr/X11/include/X11/extensions/xf86vmode.h pkg:/FSWxorg-headers-AT-0.5.11-0-DOT-75
basename file usr/X11/include/X11/extensions/xf86vmode.h pkg:/SUNWxorg-headers-AT-0.5.11-0-DOT-86
basename file usr/X11/include/X11/extensions/xf86vmode.h pkg:/SUNWxorg-headers-AT-0.5.11-0-DOT-79
basename file usr/X11/include/X11/extensions/xf86vmode.h pkg:/SUNWxorg-headers-AT-0.5.11-0-DOT-86
Great, install these packages.
$ pfexec pkg install SUNWxwinc SUNWxorg-headers
$ CFLAGS='-I/usr/X11' LDFLAGS='-L/usr/X11/lib -R/usr/X11/lib' ./configure --prefix=/usr --includedir=/usr/X11/include
$ make
Really easy. :-)