From be79c691616f7ab8b3816c67cfdaaba4f11b1b1f Mon Sep 17 00:00:00 2001 From: Jonathan Moore Liles Date: Mon, 16 Apr 2012 21:26:49 -0700 Subject: [PATCH] Add a master configure script. --- Makefile | 12 ++++++++--- configure | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++++ lib/Makefile | 5 ++--- 3 files changed, 70 insertions(+), 6 deletions(-) create mode 100755 configure diff --git a/Makefile b/Makefile index 4e9970a..7240341 100644 --- a/Makefile +++ b/Makefile @@ -19,8 +19,16 @@ SUBDIRS=lib nonlib FL timeline mixer session-manager sequencer +all: .config + +.config: configure + ./configure + +config: configure + ./configure + all: - @ for dir in $(SUBDIRS); do $(MAKE) -s -C $$dir; done + @ for dir in $(SUBDIRS); do echo Building $$dir; $(MAKE) -s -C $$dir; done clean: @ for dir in $(SUBDIRS); do $(MAKE) -s -C $$dir clean; done @@ -28,5 +36,3 @@ clean: install: @ for dir in $(SUBDIRS); do $(MAKE) -s -C $$dir install; done -config: - @ for dir in $(SUBDIRS); do $(MAKE) -s -C $$dir config; done diff --git a/configure b/configure new file mode 100755 index 0000000..dfa5258 --- /dev/null +++ b/configure @@ -0,0 +1,59 @@ +#!/bin/sh +# +# Copyright (C) 2008 Jonathan Moore Liles +# This file is licensed under version 2 of the GPL. + +. scripts/config-funcs + +begin + +begin_options + +echo "Master configuration" + +ask "Installation prefix" prefix /usr/local +ask "Build for debugging" USE_DEBUG no + +begin_tests + +# should require everything all of the subprojects require + +require_command ar ar +require_command makedepend makedepend +require_FLTK 1.3.0 images +require_command FLUID lib/fltk/fluid/fluid +require_package JACK 0.103.0 jack +test_version `version_of jack` 0.105.0 || append "JACK_MIDI_PROTO_API=yes" +require_package sndfile 1.0.17 sndfile +require_package lrdf 0.4.0 lrdf +require_package liblo 0.23 liblo +suggest_package XPM 2.0.0 xpm +require_package sigcpp 2.0.0 sigc++-2.0 + +test_version `version_of liblo` 0.26 || warn "Version $(version_of liblo) of liblo is slow to create servers. Consider upgrading to 0.26 or later" + +if ! hostname_resolvable +then + echo "Your hostname \"$(hostname)\" does not resolve to a valid address." + echo "This is a broken configuration and will cause liblo (the" + echo "OSC library) to fail to function. Add the line:" + echo + echo "127.0.0.1 $(hostname)" + echo + echo "to your /etc/hosts file to fix. And consider switching to a saner distribution." + echo + fail "Invalid hostname!" +fi + +end + +# installing configuration +echo -n "Copying configuration to modules..." + +for i in nonlib FL timeline mixer sequencer session-manager +do + echo -n "$i " + cp .config "$i" +done + +echo diff --git a/lib/Makefile b/lib/Makefile index 1ca7c4e..526df99 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -1,5 +1,4 @@ - OBJS:= fltk/lib/libfltk.a fltk/lib/libfltk_images.a SRCS:= fltk/src/*.cpp fltk/FL/*.H @@ -11,11 +10,11 @@ $(OBJS): fltk/config.h $(SRCS) @ echo Building FLTK cd fltk && make -fltk/config.h: Makefile +config: @ echo Configuring FLTK cd fltk && ./configure --prefix=/dev/null --disable-shared --disable-gl --enable-threads --enable-xft --disable-xdbe --enable-xinerama -config: $(OBJS) +# config: $(OBJS) clean: