summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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"