mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-21 08:01:30 -07:00
Support building via autoconf and automake. mkfiles.pl now outputs a
Makefile.am, and there's a new mkauto.sh which builds a corresponding configure script. The old makefile has been renamed from 'Makefile' to 'Makefile.gtk', indicating that the intended new _default_ approach is to use the autoconf world. Makefile.gtk is provided as an emergency fallback in case anything fails with the new stuff that used to work with it. The new configure script does not support the same $(BINPREFIX) system as the old Makefile did. However, as I understand it, it should be possible to configure using --program-prefix="sgt-" (for example) and then the binaries should all be renamed appropriately at install time. The Makefile.am is quite painful. The Puzzles codebase relies heavily on compiling individual object files multiple times with different the cpp flags per build deliverable (program or library) and not per source file. Solution: anything built with non-default compile options has to go in its own little library. But that doesn't work either in the general case, because as soon as you have more than one such library linked into an application, Unix ld semantics bite you if the objects in the libraries both refer to each other. So I ended up building all those little libraries but not _using_ them - instead the link commands for the programs needing those objects refer to the objects directly, under the silly names that automake gives them. (That's less fragile than it sounds, because it does _document_ the names of the intermediate object files. But still, yuck.) [originally from svn r9886]
This commit is contained in:
15
configure.ac
Normal file
15
configure.ac
Normal file
@ -0,0 +1,15 @@
|
||||
dnl Configure script for the Unix GTK build of puzzles.
|
||||
|
||||
AC_INIT([puzzles], rNNNN, [anakin@pobox.com])
|
||||
AC_CONFIG_SRCDIR([midend.c])
|
||||
AM_INIT_AUTOMAKE([foreign])
|
||||
AC_PROG_CC
|
||||
if test "x$GCC" = "xyes"; then
|
||||
: # FIXME: do something interesting enabling as many warning
|
||||
# options as possible without breaking system headers.
|
||||
fi
|
||||
AM_PATH_GTK_2_0([2.0.0])
|
||||
AC_PROG_RANLIB
|
||||
AC_PROG_INSTALL
|
||||
AC_CONFIG_FILES([Makefile])
|
||||
AC_OUTPUT
|
Reference in New Issue
Block a user