Ticket #9722: get_fltk-against-upstream.diff

File get_fltk-against-upstream.diff, 2.4 KB (added by leif, 11 years ago)

Just to ease seeing some of the changes I made... (Do not apply, it's in the patch, too.)

  • get_fltk

    old new  
    22  case "$which_graphic_lib" in
    33    fltk) with_fltk=yes;;
    44  esac
     5  # (Just the) Comment by leif:
     6  # In case not all necessary parts of X11 (headers *and* lib)
     7  # were found, look for FLTK:
    58  if test -z "$X11"; then with_fltk=yes; fi
    69fi
    710if test -n "$with_fltk"; then
     11  orig_which_graphic_lib=$which_graphic_lib
    812  which_graphic_lib=fltk
    913  FLTKDIR=
    1014  case "$with_fltk" in
     
    1519     fi
    1620     ;;
    1721  *) if test ! -d "$with_fltk"; then
    18       echo "### FLTK directory '$with_fltk' not found"
     22      echo "### Specified FLTK directory '$with_fltk' not found."
    1923    else
    2024      FLTKDIR=$with_fltk
    2125    fi;;
    2226  esac
    2327  if test -n "$FLTKDIR"; then
    24     case "$FLTKDIR" in /) FLTKDIR=;; esac
    25     echo "Using FLTK library, FLTKDIR = $FLTKDIR"
     28    case "$FLTKDIR" in /) FLTKDIR=;; esac # leif: ???
     29    case "$orig_which_graphic_lib" in
     30      none)
     31        # echo "...Found FLTK library in \"$FLTKDIR\"."
     32        if test -n "$fltk"; then
     33          echo "...Found FLTK library in \"$fltk\"."
     34        else
     35          echo "...Assuming FLTK library is in specified directory \"$FLTKDIR\"."
     36        fi
     37        if test -d "$FLTKDIR/include/FL"; then
     38          echo "...Found FLTK header files in \"$FLTKDIR/include/FL\"."
     39        else
     40          echo "...But FLTK header files/include directory not found."
     41        fi
     42        which_graphic_lib=none # =$orig_which_graphic_lib
     43        ;;
     44      *)
     45        if test -d "$FLTKDIR/include/FL"; then
     46          echo "Using FLTK library, FLTKDIR = \"$FLTKDIR\"."
     47        else
     48          echo "### Found FLTK library, but not the necessary headers."
     49          echo "### Building without FLTK support."
     50          which_graphic_lib=none
     51        fi
     52        ;;
     53    esac
    2654  else
    27     echo "### FLTK not found. Building without FLTK support"
     55    echo "### FLTK not found. Building without FLTK support."
     56    case "$orig_which_graphic_lib" in
     57      none)
     58        echo "(This is just informational - no graphics support was requested anyway.)"
     59        ;;
     60    esac
    2861    which_graphic_lib=none
    2962  fi
    3063  case "$osname" in
    3164    cygwin) FLTK_LIBS="-lgdi32 -lole32 -luuid -lwsock32 -lsupc++" ;;
    3265    darwin) FLTK_LIBS="-framework Carbon -lsupc++" ;;
    33     *)      FLTK_LIBS="$X11_LIBS" ;;
     66    *)      FLTK_LIBS="$X11_LIBS -lstdc++" ;;
    3467  esac
    3568fi