Re-enable quoting in fltk-config(.in) [fix PR #17]
- add some more missing quotes - use `eval` to execute the compile/build command. Tested with both configure/Make and CMake (Ninja) after installing in a path that contains spaces (Linux only so far).
This commit is contained in:
parent
3922ef67c1
commit
f74f66e507
@ -44,12 +44,12 @@ CAIROFLAGS="@CAIROFLAGS@"
|
||||
# otherwise it is an empty string
|
||||
BINARY_DIR=@BINARY_DIR@
|
||||
|
||||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
prefix="@prefix@"
|
||||
exec_prefix="@exec_prefix@"
|
||||
exec_prefix_set=no
|
||||
includedir=@includedir@
|
||||
libdir=@libdir@
|
||||
srcdir=@srcdir@
|
||||
includedir="@includedir@"
|
||||
libdir="@libdir@"
|
||||
srcdir="@srcdir@"
|
||||
|
||||
# BEGIN fltk-config code
|
||||
|
||||
@ -72,25 +72,25 @@ GLLIBS="@GLLIBS@"
|
||||
|
||||
# Check bundled image libraries in source tree
|
||||
if test -f "$libdir/libfltk_jpeg.a"; then
|
||||
CFLAGS="-I$includedir/jpeg $CFLAGS"
|
||||
CXXFLAGS="-I$includedir/jpeg $CXXFLAGS"
|
||||
CFLAGS="-I'$includedir/jpeg' $CFLAGS"
|
||||
CXXFLAGS="-I'$includedir/jpeg' $CXXFLAGS"
|
||||
fi
|
||||
|
||||
if test -f "$libdir/libfltk_z.a"; then
|
||||
CFLAGS="-I$includedir/zlib $CFLAGS"
|
||||
CXXFLAGS="-I$includedir/zlib $CXXFLAGS"
|
||||
CFLAGS="-I'$includedir/zlib' $CFLAGS"
|
||||
CXXFLAGS="-I'$includedir/zlib' $CXXFLAGS"
|
||||
fi
|
||||
|
||||
if test -f "$libdir/libfltk_png.a"; then
|
||||
CFLAGS="-I$includedir/png $CFLAGS"
|
||||
CXXFLAGS="-I$includedir/png $CXXFLAGS"
|
||||
CFLAGS="-I'$includedir/png' $CFLAGS"
|
||||
CXXFLAGS="-I'$includedir/png' $CXXFLAGS"
|
||||
fi
|
||||
|
||||
# Check bundled image libraries in installation folder.
|
||||
# Note: jpeg, png, and zlib headers are installed in FL/images
|
||||
if test -d $includedir/FL/images; then
|
||||
CFLAGS="-I$includedir/FL/images $CFLAGS"
|
||||
CXXFLAGS="-I$includedir/FL/images $CXXFLAGS"
|
||||
if test -d "$includedir/FL/images"; then
|
||||
CFLAGS="-I'$includedir/FL/images' $CFLAGS"
|
||||
CXXFLAGS="-I'$includedir/FL/images' $CXXFLAGS"
|
||||
fi
|
||||
|
||||
# Cairo support
|
||||
@ -254,39 +254,39 @@ do
|
||||
done
|
||||
|
||||
if test "$includedir" != /usr/include; then
|
||||
includes="-I$includedir"
|
||||
includes="-I'$includedir'"
|
||||
else
|
||||
includes=
|
||||
fi
|
||||
|
||||
# prepend build directory for fltk-config in CMake build folder
|
||||
if test -n "$BINARY_DIR"; then
|
||||
includes="-I$BINARY_DIR $includes"
|
||||
includes="-I'$BINARY_DIR' $includes"
|
||||
fi
|
||||
|
||||
if test "$libdir" != /usr/lib -a "$libdir" != /usr/lib32; then
|
||||
libs="-L$libdir"
|
||||
libs="-L'$libdir'"
|
||||
else
|
||||
libs=
|
||||
fi
|
||||
|
||||
# Calculate needed libraries
|
||||
LDSTATIC="$libdir/libfltk.a $LDLIBS"
|
||||
LDSTATIC="'$libdir/libfltk.a' $LDLIBS"
|
||||
LDLIBS="-lfltk$SHAREDSUFFIX $LDLIBS"
|
||||
|
||||
if test x$use_forms = xyes; then
|
||||
LDLIBS="-lfltk_forms$SHAREDSUFFIX $LDLIBS"
|
||||
LDSTATIC="$libdir/libfltk_forms.a $LDSTATIC"
|
||||
LDSTATIC="'$libdir/libfltk_forms.a' $LDSTATIC"
|
||||
fi
|
||||
|
||||
if test x$use_gl = xyes; then
|
||||
LDLIBS="-lfltk_gl$SHAREDSUFFIX $GLLIBS $LDLIBS"
|
||||
LDSTATIC="$libdir/libfltk_gl.a $GLLIBS $LDSTATIC"
|
||||
LDSTATIC="'$libdir/libfltk_gl.a' $GLLIBS $LDSTATIC"
|
||||
fi
|
||||
|
||||
if test x$use_images = xyes; then
|
||||
LDLIBS="-lfltk_images$SHAREDSUFFIX $IMAGELIBS $LDLIBS"
|
||||
LDSTATIC="$libdir/libfltk_images.a $STATICIMAGELIBS $LDSTATIC"
|
||||
LDSTATIC="'$libdir/libfltk_images.a' $STATICIMAGELIBS $LDSTATIC"
|
||||
fi
|
||||
|
||||
if test x$use_cairo = xyes -a -n "$CAIROLIBS"; then
|
||||
@ -327,7 +327,7 @@ if test -n "$compile"; then
|
||||
command="$CXX $ARCHFLAGS $includes $CXXFLAGS $debug -o $prog $flags $compile $files $LDSTATIC $link"
|
||||
|
||||
echo $command
|
||||
$command || exit 1
|
||||
eval $command || exit 1
|
||||
fi
|
||||
|
||||
if test -n "$post"; then
|
||||
@ -395,7 +395,7 @@ if test "$echo_ldflags" = "yes"; then
|
||||
libdirs="$libs"
|
||||
|
||||
for i in $LDLIBS ; do
|
||||
if test $i != "-L$libdir" ; then
|
||||
if test $i != "-L'$libdir'" ; then
|
||||
if test -z "$my_libs" ; then
|
||||
my_libs="$i"
|
||||
else
|
||||
@ -411,22 +411,22 @@ if test "$echo_ldstaticflags" = "yes"; then
|
||||
fi
|
||||
|
||||
if test "$echo_libs" = "yes"; then
|
||||
USELIBS="$libdir/libfltk.a"
|
||||
USELIBS="'$libdir/libfltk.a'"
|
||||
|
||||
if test x$use_forms = xyes; then
|
||||
USELIBS="$libdir/libfltk_forms.a $USELIBS"
|
||||
USELIBS="'$libdir/libfltk_forms.a' $USELIBS"
|
||||
fi
|
||||
|
||||
if test x$use_gl = xyes; then
|
||||
USELIBS="$libdir/libfltk_gl.a $USELIBS"
|
||||
USELIBS="'$libdir/libfltk_gl.a' $USELIBS"
|
||||
fi
|
||||
|
||||
if test x$use_images = xyes; then
|
||||
USELIBS="$libdir/libfltk_images.a $USELIBS"
|
||||
USELIBS="'$libdir/libfltk_images.a' $USELIBS"
|
||||
|
||||
for lib in fltk_jpeg fltk_png fltk_z; do
|
||||
if test -f "$libdir/lib$lib.a"; then
|
||||
USELIBS="$libdir/lib$lib.a $USELIBS"
|
||||
USELIBS="'$libdir/lib$lib.a' $USELIBS"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user