if test -z "$with_fltk"; then
  case "$which_graphic_lib" in
    fltk) with_fltk=yes;;
  esac
  if test -z "$X11"; then with_fltk=yes; fi
fi
if test -n "$with_fltk"; then
  which_graphic_lib=fltk
  FLTKDIR=
  case "$with_fltk" in
  yes)
     pth=$libpth; lib=fltk; . ./locatelib
     if test -n "$fltk"; then
       FLTKDIR=`dirname $fltk | sed -e 's/lib\/$//'`
     fi
     ;;
  *) if test ! -d "$with_fltk"; then
      echo "### FLTK directory '$with_fltk' not found"
    else
      FLTKDIR=$with_fltk
    fi;;
  esac
  if test -n "$FLTKDIR"; then
    case "$FLTKDIR" in /) FLTKDIR=;; esac
    echo "Using FLTK library, FLTKDIR = $FLTKDIR"
  else
    echo "### FLTK not found. Building without FLTK support"
    which_graphic_lib=none
  fi
  case "$osname" in
    cygwin) FLTK_LIBS="-lgdi32 -lole32 -luuid -lwsock32 -lsupc++" ;;
    darwin) FLTK_LIBS="-framework Carbon -lsupc++" ;;
    *)      FLTK_LIBS="$X11_LIBS" ;;
  esac
fi
