summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2005-05-12 17:27:59 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2005-05-12 17:27:59 +0000
commit743b0f984e517dc199864fd2597def360957d7ce (patch)
tree7dcf5c00e0a07b6fd8f3bdfee1bab0787dd2bed6
parentfdf8cbad747226edb4a4568aa29b115cab43a40a (diff)
The fltk-config script now supports running from a source
directory (STR #840) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4341 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
-rw-r--r--CHANGES2
-rwxr-xr-xfltk-config.in23
2 files changed, 25 insertions, 0 deletions
diff --git a/CHANGES b/CHANGES
index 322ea2443..722441c41 100644
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,8 @@ CHANGES IN FLTK 1.1.7
- Documentation fixes (STR #648, STR #692, STR #730, STR
#744, STR #745)
+ - The fltk-config script now supports running from a
+ source directory (STR #840)
- Fl_Browser_ didn't update the position properly when an
item was deleted (STR #839)
- fl_contrast() now compares the luminosity of each color
diff --git a/fltk-config.in b/fltk-config.in
index 1a6645f98..816089529 100755
--- a/fltk-config.in
+++ b/fltk-config.in
@@ -36,6 +36,7 @@ APIVERSION="$MAJOR_VERSION.$MINOR_VERSION"
### BEGIN fltk-config
+selfdir=`dirname $0`
prefix=@prefix@
exec_prefix=@exec_prefix@
exec_prefix_set=no
@@ -57,6 +58,28 @@ CXXFLAGS="@CXXFLAGS@"
LDFLAGS="@LDFLAGS@"
LDLIBS="@LIBS@"
+# Check for local invocation, and update paths accordingly...
+if test -e "$selfdir/FL/Fl_Window.H"; then
+ bindir="$selfdir/fluid"
+ includedir="$selfdir"
+ libdir="$selfdir/lib"
+
+ if test -e "$libdir/libfltk_jpeg.a"; then
+ CFLAGS="-I$includedir/jpeg $CFLAGS"
+ CXXFLAGS="-I$includedir/jpeg $CXXFLAGS"
+ fi
+
+ if test -e "$libdir/libfltk_z.a"; then
+ CFLAGS="-I$includedir/zlib $CFLAGS"
+ CXXFLAGS="-I$includedir/zlib $CXXFLAGS"
+ fi
+
+ if test -e "$libdir/libfltk_png.a"; then
+ CFLAGS="-I$includedir/png $CFLAGS"
+ CXXFLAGS="-I$includedir/png $CXXFLAGS"
+ fi
+fi
+
if test -d $includedir/FL/images; then
CFLAGS="-I$includedir/FL/images $CFLAGS"
CXXFLAGS="-I$includedir/FL/images $CXXFLAGS"