home *** CD-ROM | disk | FTP | other *** search
/ ftp.fox-toolkit.org / 2014.05.ftp.fox-toolkit.org.tar / ftp.fox-toolkit.org / pub / sample_acinclude.m4 < prev    next >
Text File  |  2001-06-28  |  27KB  |  1,133 lines

  1. AC_DEFUN(AC_FIND_FILE,
  2.     [
  3.         $3="NO"
  4.         for i in $2; do
  5.             for j in $1; do
  6.                 if test -r "$i/$j"; then
  7.                     $3=$i
  8.                     break 2
  9.                 else
  10.                     echo "tried $i" >&AC_FD_CC
  11.                 fi
  12.             done
  13.         done
  14.     ])
  15.  
  16. AC_DEFUN(AC_CHECK_IF_EXIST,
  17.     [
  18.         for j in $2; do
  19.             if test "$j" = "$1"; then
  20.                 :
  21.                 $3
  22.                 break 1
  23.             fi
  24.         done
  25.     ])
  26.  
  27. AC_DEFUN(AC_FIND_WILDFILE,
  28.     [
  29.         $3="NO"
  30.         for i in $2; do
  31.             for j in $1; do
  32.                 if test -z "`ls -1 $i/$j 2> /dev/null`"; then
  33.                     echo "tried $i" >&AC_FD_CC
  34.                 else
  35.                     $3=$i
  36.                     break 2
  37.                 fi
  38.             done
  39.         done
  40.     ])
  41.  
  42. AC_DEFUN(PRINT_FOX_PROGRAM, [
  43. cat > conftest.$ac_ext <<EOF
  44. #include "confdefs.h"
  45. #include "fx.h"
  46. #include "fx3d.h"
  47. int main() {
  48.   FXApp app("Hello","Hello");
  49.   return 0;
  50.   }
  51. EOF
  52. ])
  53.  
  54. AC_DEFUN(AC_CHECK_COMPILER_FLAG,
  55.     [
  56.         AC_REQUIRE([AC_CHECK_COMPILER_OPTIONS])
  57.         AC_MSG_CHECKING(whether $CXX supports -$1)
  58.         ac_flag_cache=`echo $1 | sed 'y%.=/+-%___p_%'`
  59.         AC_CACHE_VAL(ac_cv_prog_cxx_$ac_flag_cache,
  60.             [
  61.                 echo 'void f(){}' >conftest.cpp
  62.                 if test -z "`$CXX -$1 -c conftest.cpp 2>&1`"; then
  63.                     eval "ac_cv_prog_cxx_$ac_flag_cache=yes"
  64.                 else
  65.                     eval "ac_cv_prog_cxx_$ac_flag_cache=no"
  66.                 fi
  67.                 rm -f conftest*
  68.             ])
  69.         if eval "test \"`echo '$ac_cv_prog_cxx_'$ac_flag_cache`\" = yes"; then
  70.             AC_MSG_RESULT(yes)
  71.             :
  72.             $2
  73.         else
  74.             AC_MSG_RESULT(no)
  75.             :
  76.             $3
  77.         fi
  78.     ])
  79.  
  80. AC_DEFUN(AC_CHECK_COMPILER_OPTIONS,
  81.     [
  82.         AC_REQUIRE([AC_PROG_CXX])
  83.         AC_ARG_ENABLE(debug,
  84.             [  --enable-debug          creates debugging code [default=no]],
  85.             [
  86.                 if test $enableval = "no"; then
  87.                     ac_use_debug_code="no"
  88.                 else
  89.                     ac_use_debug_code="yes"
  90.                 fi
  91.             ],
  92.             [
  93.                 ac_use_debug_code="no"
  94.             ])
  95.         AC_ARG_ENABLE(strict,
  96.             [  --enable-strict         compiles with strict compiler options (may not work!)],
  97.             [
  98.                 if test $enableval = "no"; then
  99.                     ac_use_strict_options="no"
  100.                 else
  101.                     ac_use_strict_options="yes"
  102.                 fi
  103.             ],
  104.             [
  105.                 ac_use_strict_options="no"
  106.             ])
  107.  
  108.         if test -z "$CXXFLAGS" || test "$CXXFLAGS" = "-g -O2"; then
  109.             if test "$ac_use_debug_code" = "yes"; then
  110.                 if test $ac_cv_prog_cxx_g = yes; then
  111.                     CXXFLAGS="-g -DDEBUG"
  112.                 fi
  113.             else
  114.                 if test "$GXX" = "yes"; then
  115.                     CXXFLAGS="-O2"
  116.                 else
  117.                     CXXFLAGS=""
  118.                 fi
  119.             fi
  120.  
  121.             #AC_CHECK_COMPILER_FLAG(fno-exceptions,[CXXFLAGS="$CXXFLAGS -fno-exceptions"])
  122.             AC_CHECK_COMPILER_FLAG(fno-rtti,[CXXFLAGS="$CXXFLAGS -fno-rtti"])
  123.             #AC_CHECK_COMPILER_FLAG(fno-check-new,[CXXFLAGS="$CXXFLAGS -fno-check-new"])
  124.  
  125.             if test "$GXX" = "yes"; then
  126.  
  127.                 CXXFLAGS="$CXXFLAGS"
  128.  
  129.                 if test "$ac_use_debug_code" = "yes"; then
  130.                     CXXFLAGS="$CXXFLAGS -Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings"
  131.                     AC_CHECK_COMPILER_FLAG(Wno-long-long,[CXXFLAGS="$CXXFLAGS -Wno-long-long"])
  132.                     AC_CHECK_COMPILER_FLAG(fno-builtin,[CXXFLAGS="$CXXFLAGS -fno-builtin"])
  133.                 fi
  134.  
  135.                 if test "$ac_use_strinct_options" = "yes"; then
  136.                     CXXFLAGS="$CXXFLAGS -Wcast-qual -Wbad-function-cast -Wshadow -Wcast-align -Woverloaded-virtual"
  137.                 fi
  138.  
  139.             fi
  140.         fi
  141.  
  142.         AC_CHECK_COMPILER_FLAG(fexceptions,[USE_EXCEPTIONS="-fexceptions"],USE_EXCEPTIONS=)
  143.         AC_SUBST(USE_EXCEPTIONS)
  144.         AC_CHECK_COMPILER_FLAG(frtti,[USE_RTTI="-frtti"],USE_RTTI=)
  145.         AC_SUBST(USE_RTTI)
  146.  
  147.         ifdef(AM_DEPENDENCIES, AC_REQIURE([AC_ADD_DEPENDENCIES]), [])
  148.         ])
  149.  
  150.  
  151. AC_DEFUN(AC_ADD_DEPENDENCIES,
  152.     [
  153.         [A]M_DEPENDENCIES(CC)
  154.         [A]M_DEPENDENCIES(CXX)
  155.     ])
  156.  
  157.  
  158. AC_DEFUN(AC_FIND_XWIN, [
  159.     AC_MSG_CHECKING(for X)
  160.     AC_CACHE_VAL(ac_cv_have_x,
  161.         [# One or both of the vars are not set, and there is no cached value.
  162.             ac_x_includes=NO ac_x_libraries=NO
  163.             AC_PATH_X_DIRECT
  164.             AC_PATH_X_XMKMF
  165.             if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
  166.                 AC_MSG_ERROR([Can't find X includes. Please check your installation and add the correct paths!])
  167.             else
  168.                 dnl Record where we found X for the cache.
  169.                 ac_cv_have_x="have_x=yes ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
  170.             fi
  171.         ])dnl
  172.  
  173.     eval "$ac_cv_have_x"
  174.  
  175.     if test "$have_x" != yes; then
  176.         AC_MSG_RESULT($have_x)
  177.         no_x=yes
  178.     else
  179.         dnl If each of the values was on the command line, it overrides each guess.
  180.         test "x$x_includes" = xNONE && x_includes=$ac_x_includes
  181.         test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
  182.         dnl Update the cache value to reflect the command line values.
  183.         ac_cv_have_x="have_x=yes ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
  184.         AC_MSG_RESULT([libraries $x_libraries, headers $x_includes])
  185.         X_LIBS="-lX11 -lXext"
  186.     fi
  187.  
  188.     if test -z "$x_includes" || test "x$x_includes" = xNONE; then
  189.         X_INCLUDES=""
  190.         x_includes="."; dnl better than nothing :-
  191.     else
  192.         X_INCLUDES="-I$x_includes"
  193.     fi
  194.  
  195.     if test -z "$x_libraries" || test "x$x_libraries" = xNONE; then
  196.         X_LDFLAGS=""
  197.         x_libraries="/usr/lib"; dnl better than nothing :-
  198.     else
  199.         X_LDFLAGS="-L$x_libraries"
  200.     fi
  201.     all_includes="$all_includes $X_INCLUDES"
  202.     all_libraries="$all_libraries $X_LDFLAGS $X_LIBS"
  203.  
  204.     AC_SUBST(X_INCLUDES)
  205.     AC_SUBST(X_LDFLAGS)
  206.     AC_SUBST(X_LIBS)
  207.     AC_SUBST(x_libraries)
  208.     AC_SUBST(x_includes)
  209. ])
  210.  
  211.  
  212. AC_DEFUN(AC_HAVE_OPENGL,
  213.     [
  214.         AC_REQUIRE_CPP()dnl
  215.         AC_REQUIRE([AC_FIND_XWIN])
  216.  
  217.         test -z "$GL_INCLUDES" && GL_INCLUDES=
  218.         test -z "$GL_LDFLAGS" && GL_LDFLAGS=
  219.         test -z "$GL_LIBS"     && GL_LIBS=
  220.  
  221.         AC_ARG_WITH(opengl,[  --without-opengl        enable OpenGL ],opengl_test="no",opengl_test="yes")
  222.  
  223.         if test "x$opengl_test" = xno; then
  224.             ac_cv_have_opengl=no
  225.         else
  226.             AC_MSG_CHECKING(for OpenGL)
  227.             AC_CACHE_VAL(ac_cv_have_opengl,
  228.                 [
  229.                     dnl Find header files
  230.  
  231.                     gl_incdirs="/usr/X11R6/include /usr/include /usr/X11R6/include/X11 /usr/local/include $x_includes"
  232.                     AC_FIND_FILE(GL/gl.h, $gl_incdirs, gl_incdir)
  233.  
  234.                     dnl is our OpenGL Mesa3D ?
  235.  
  236.                     if test "$gl_incdir" != "NO"; then
  237.                         gl_version="OpenGL `eval \"grep GL_VERSION_ $gl_incdir/GL/gl.h | tail -n 1 | sed -e s/#define\ *GL_VERSION_//\;y/_/./\;s/\ *1$//g\"`"
  238.                         if test -x "$gl_incdir/GL/osmesa.h" && test -x "$gl_incdir/GL/xmesa.h"; then
  239.                             gl_version="$gl_version (Mesa3D)"
  240.                         elif test "`eval \"grep glResizeBuffersMESA $gl_incdir/GL/gl.h 2> /dev/null\"`"; then
  241.                             gl_version="$gl_version (Mesa3D-XFree86)"
  242.                         fi
  243.  
  244.                         gl_include="$gl_incdir"
  245.  
  246.                         gl_libdirs="/usr/X11R6/lib /usr/lib /usr/local/lib $x_libraries"
  247.                         gl_libdir=""
  248.  
  249.                         for dir in $gl_libdirs; do
  250.                             if test -z "`ls -1 $dir/libGL.* 2> /dev/null`"; then
  251.                                 echo "tried $dir" >&AC_FD_CC
  252.                             else
  253.                                 gl_libdir="$dir"
  254.                                 break
  255.                             fi
  256.                         done
  257.  
  258.                         if test -z "$gl_libdir"; then
  259.                             for dir in $gl_libdirs; do
  260.                                 if test -z "`ls -1 $dir/libMesaGL.* 2> /dev/null`"; then
  261.                                     echo "tried $dir" >&AC_FD_CC
  262.                                 else
  263.                                     gl_libdir="$dir"
  264.                                     break
  265.                                 fi
  266.                             done
  267.                             if test "$gl_libdir"; then
  268.                                 gl_libs="-lMesaGL"
  269.                                 gl_ldflags="$gl_libdir"
  270.                             fi
  271.                         else
  272.                             gl_libs="-lGL"
  273.                             gl_ldflags="$gl_libdir"
  274.                         fi
  275.  
  276.                         if test "$gl_libs"; then
  277.                             AC_LANG_CPLUSPLUS
  278.                             c_save_ldflags="$LDFLAGS"
  279.                             c_save_cxxflags="$CXXFLAGS"
  280.  
  281.                             CXXFLAGS="$CXXFLAGS $X_INCLUDES $GL_INCLUDES -I$gl_include"
  282.                             LDFLAGS="$LDFLAGS $X_LDFLAGS $all_libraries $GL_LDFLAGS $GL_LIBS -L$gl_ldflags $gl_libs"
  283.                             AC_TRY_LINK([],[],
  284.                                 ac_cv_have_opengl="have_opengl=yes ac_gl_version=\"$gl_version\" ac_gl_include=$gl_include ac_gl_ldflags=$gl_ldflags ac_gl_libs=$gl_libs",
  285.                                 ac_cv_have_opengl="have_opengl=no"
  286.                                 )
  287.                             LDFLAGS="$ac_save_ldflags"
  288.                             CXXFLAGS="$ac_save_cxxflags"
  289.                         else
  290.                             ac_cv_have_opengl="have_opengl=no"
  291.                     fi
  292.                     else
  293.                         ac_cv_have_opengl="have_opengl=no"
  294.                 fi
  295.                 ])
  296.             eval "$ac_cv_have_opengl"
  297.             if test "$have_opengl" = "no"; then
  298.                 AC_MSG_RESULT(no)
  299.                 GL_LDFLAGS=""
  300.                 GL_INCLUDES=""
  301.                 GL_LIBS=""
  302.                 gl_result="no"
  303.                 $2
  304.             else
  305.                 AC_DEFINE(HAVE_OPENGL, 1, [Defines if you have OpenGL])
  306.                 if test "`echo \"$ac_gl_version\" | grep \\(Mesa3D\\)`"; then
  307.                     AC_DEFINE(HAVE_MESA, 1, [Defines if you have Mesa implementatnion of OpenGL api])
  308.                 fi
  309.                 GL_INCLUDES="$GL_INCLUDES -I$ac_gl_include"
  310.                 GL_LDFLAGS="$GL_LDFLAGS -L$ac_gl_ldflags"
  311.                 GL_LIBS="$GL_LIBS $ac_gl_libs"
  312.                 AC_MSG_RESULT($ac_gl_version)
  313.                 $1
  314.             fi
  315.         fi
  316.         AC_SUBST(GL_INCLUDES)
  317.         AC_SUBST(GL_LDFLAGS)
  318.         AC_SUBST(GL_LIBS)
  319.     ])
  320.  
  321.  
  322. AC_DEFUN(AC_HAVE_OPENGLU,
  323.     [
  324.         AC_REQUIRE([AC_HAVE_OPENGL])
  325.  
  326.         eval "$ac_cv_have_opengl"
  327.  
  328.         if test "$have_opengl" = "yes"; then
  329.  
  330.             AC_MSG_CHECKING(for OpenGL GLU)
  331.             AC_CACHE_VAL(ac_cv_have_openglu,
  332.                 [
  333.                     dnl Find header files
  334.  
  335.                     glu_incdirs="/usr/X11R6/include /usr/include /usr/X11R6/include/X11 /usr/local/include $x_includes"
  336.  
  337.                     AC_FIND_FILE(GL/glu.h, $glu_incdirs, glu_incdir)
  338.  
  339.                     dnl Test OpenGLU version
  340.  
  341.                     if test "$glu_incdir"; then
  342.                         glu_version="OpenGLU `eval \"grep GLU_VERSION_ $glu_incdir/GL/glu.h | tail -n 1 | sed -e s/#define\ *GLU_VERSION_//\;y/_/./\;s/\ *1$//g\"`"
  343.  
  344.                         glu_include="$glu_incdir"
  345.  
  346.                         glu_libdirs="/usr/X11R6/lib /usr/lib /usr/local/lib $gl_libs $x_libraries"
  347.                         glu_libdir=""
  348.  
  349.                         for dir in $glu_libdirs; do
  350.                             if test -z "`ls -1 $dir/libGLU.* 2> /dev/null`"; then
  351.                                 echo "tried $dir" >&AC_FD_CC
  352.                             else
  353.                                 glu_libdir="$dir"
  354.                                 break
  355.                             fi
  356.                         done
  357.  
  358.                         if test -z "$glu_libdir"; then
  359.  
  360.                             for dir in $glu_libdirs; do
  361.                                 if test -z "`ls -1 $dir/libMesaGLU.* 2> /dev/null`"; then
  362.                                     echo "tried $dir" >&AC_FD_CC
  363.                                 else
  364.                                     glu_libdir="$dir"
  365.                                     break
  366.                                 fi
  367.                             done
  368.  
  369.                             if test "$glu_libdir"; then
  370.                                 glu_libs="-lMesaGLU"
  371.                                 glu_ldflags="$glu_libdir"
  372.                             fi
  373.                         else
  374.                             glu_libs="-lGLU"
  375.                             glu_ldflags="$glu_libdir"
  376.                         fi
  377.  
  378.                         if test "$glu_libs"; then
  379.                             AC_LANG_CPLUSPLUS
  380.                             ac_save_ldflags="$LDFLAGS"
  381.                             ac_save_cxxflags="$CXXFLAGS"
  382.  
  383.                             CXXFLAGS="$CXXFLAGS $X_INCLUDES $GL_INCLUDES -I$glu_include"
  384.                             LDFLAGS="$LDFLAGS $X_LDFLAGS $all_libraries $GL_LDFLAGS $GL_LIBS -L$glu_ldflags $glu_libs"
  385.  
  386.                             AC_TRY_LINK([],[],
  387.                                 ac_cv_have_openglu="have_openglu=yes ac_glu_version=\"$glu_version\" ac_glu_include=$glu_include ac_glu_ldflags=$glu_ldflags ac_glu_libs=$glu_libs",
  388.                                 ac_cv_have_openglu="have_openglu=no"
  389.                                 )
  390.  
  391.                             LDFLAGS="$ac_save_ldflags"
  392.                             CXXFLAGS="$ac_save_cxxflags"
  393.                         else
  394.                             ac_cv_have_openglu="have_openglu=no"
  395.                         fi
  396.                     else
  397.                         ac_cv_have_openglu="have_openglu=no"
  398.                     fi
  399.                 ])
  400.  
  401.             eval "$ac_cv_have_openglu"
  402.  
  403.             if test "$have_openglu" = "no"; then
  404.                 AC_MSG_RESULT(no)
  405.                 glu_result="no"
  406.                 $2
  407.             else
  408.                 AC_DEFINE(HAVE_OPENGLU, 1, [Defines if you have OpenGL GLU])
  409.                 if test "ac_glu_include" != "ac_gl_include"; then
  410.                     GL_INCLUDES="$GL_INCLUDES -I$ac_glu_include"
  411.                 fi
  412.                 GL_LDFLAGS="$GL_LDFLAGS -L$ac_glu_ldflags"
  413.                 GL_LIBS="$GL_LIBS $ac_glu_libs"
  414.                 AC_MSG_RESULT([$ac_glu_version])
  415.                 $1
  416.             fi
  417.         fi
  418.     ])
  419.  
  420.  
  421. AC_DEFUN(AC_FIND_FOX,
  422.     [
  423.         AC_REQUIRE([AC_PROG_CXX])
  424.         AC_REQUIRE([AC_FIND_XWIN])
  425.  
  426.         AC_MSG_CHECKING([for FOX lib])
  427.  
  428.         ac_fox_includes=""
  429.         ac_fox_library=""
  430.  
  431.         fox_libraries=""
  432.         fox_includes=""
  433.  
  434.         AC_ARG_WITH(fox,
  435.             [  --with-fox=DIR          where the FOX library is installed. ],
  436.             [
  437.                 ac_fox_includes="$withval/include/fox"
  438.                 ac_fox_library="$withval/lib"
  439.             ])
  440.  
  441.         AC_CACHE_VAL(ac_cv_have_fox,
  442.             [
  443.                 dnl Try to guess FOX locations
  444.  
  445.                 if test -z "$ac_fox_includes"; then
  446.                     fox_incdirs="/usr/X11R6/include/fox /usr/X11R6/include/X11/fox /usr/include/fox /usr/local/include/fox $x_includes"
  447.                 else
  448.                     fox_incdirs="$ac_fox_includes"
  449.                 fi
  450.  
  451.                 AC_FIND_FILE(fx.h, $fox_incdirs, fox_incdir)
  452.  
  453.                 if test "$fox_incdir" != "NO"; then
  454.                     if test -z "$ac_fox_library"; then
  455.                         fox_libdirs="/usr/X11R6/lib /usr/lib /usr/local/lib $x_libraries"
  456.                     else
  457.                         fox_libdirs="$ac_fox_library"
  458.                     fi
  459.  
  460.                     fox_libdir=
  461.                     fox_libs=
  462.                     fox_gl_libs=
  463.  
  464.                     for dir in $fox_libdirs; do
  465.                         if test -z "`ls -1 $dir/libFOX.* 2> /dev/null`"; then
  466.                             echo "tried $dir" >&AC_FD_CC;
  467.                         else
  468.                             fox_libdir="$dir"
  469.                             fox_libs="-lFOX"
  470.                             break
  471.                         fi
  472.                     done
  473.  
  474.                     fox_compiled_with=
  475.  
  476.                     if test "`grep XShmQueryVersion $dir/libFOX.*`"; then
  477.                         fox_compiled_with="SHM"
  478.                     fi
  479.  
  480.                     fox_img_libs=""
  481.                     fox_png="no"
  482.                     fox_jpg="no"
  483.                     fox_gl="no"
  484.                     fox_opengl_libs=""
  485.                     fox_opengl_incs=""
  486.  
  487.                     if test "`grep png_read_info $dir/libFOX.*`"; then
  488.                         if test "$fox_compiled_with"; then
  489.                             fox_compiled_with="$fox_compiled_with, PNG"
  490.                         else
  491.                             fox_compiled_with="PNG"
  492.                         fi
  493.                         AC_REQUIRE([AC_FIND_PNG])
  494.                         fox_img_libs="$PNGLIB"
  495.                         fox_png="yes"
  496.                     fi
  497.  
  498.                     if test "`grep jpeg_read_header $dir/libFOX.*`"; then
  499.                         if test "$fox_compiled_with"; then
  500.                             fox_compiled_with="$fox_compiled_with, JPEG"
  501.                         else
  502.                             fox_compiled_with="JPEG"
  503.                         fi
  504.                         AC_REQUIRE([AC_FIND_JPEG])
  505.                         fox_img_libs="$fox_img_libs $JPEG_LIBS"
  506.                         fox_jpg="yes"
  507.                     fi
  508.  
  509.  
  510.                     if test "`grep glVertex $dir/libFOX*`"; then
  511.                         dnl We needed OpenGL libraries
  512.                         AC_REQUIRE([AC_HAVE_OPENGL])
  513.                         AC_REQUIRE([AC_HAVE_OPENGLU])
  514.  
  515.                         eval "$ac_cv_have_opengl"
  516.                         if test "$have_opengl" = "no"; then
  517.                             AC_MSG_ERROR([FOX needs MesaGL or GL libraries. Please check your installation! ]);
  518.                         fi
  519.  
  520.                         eval "$ac_cv_have_openglu"
  521.                         if test "$have_openglu" = "no"; then
  522.                             AC_MSG_ERROR([FOX needs MesaGLU or GLU libraries. Please check your installation! ]);
  523.                         fi
  524.  
  525.                         fox_opengl_libs="$GL_LDFLAGS $GL_LIBS -DHAVE_OPENGL"
  526.                         fox_opengl_incs="$GL_INCLUDES"
  527.                         if test "$fox_compiled_with"; then
  528.                             fox_compiled_with="$fox_compiled_with and OpenGL"
  529.                         else
  530.                             fox_compiled_with="OpenGL"
  531.                         fi
  532.                         fox_gl="yes"
  533.                     fi
  534.  
  535.                     AC_LANG_SAVE
  536.                     AC_LANG_CPLUSPLUS
  537.  
  538.                     ac_cxxflags_safe="$CXXFLAGS"
  539.                     ac_ldflags_safe="$LDFLAGS"
  540.                     ac_libs_safe="$LIBS"
  541.  
  542.                     CXXFLAGS="$CXXFLAGS -I$fox_incdir $fox_opengl_incs $X_INCLUDES"
  543.                     LDFLAGS="-L$fox_libdir $X_LDFLAGS $fox_img_libs $fox_opengl_libs"
  544.                     LIBS="$LIBS $X_LIBS $fox_libs"
  545.  
  546.                     PRINT_FOX_PROGRAM
  547.  
  548.                     if AC_TRY_EVAL(ac_link) && test -s conftest; then
  549.                         rm -f conftest*
  550.                         fox_version="FOX `eval \"ls -1 $fox_libdir/libFOX-*so* | head -n 1 | sed -e 's/.*libFOX-//;s/so\.//'\"`"
  551.                         if test "$fox_compiled_with"; then
  552.                             fox_version="$fox_version compiled with $fox_compiled_with support"
  553.                         fi
  554.                         ac_cv_have_fox="have_fox=yes ac_fox_version=\"$fox_version\""
  555.                         ac_cv_have_fox="$ac_cv_have_fox ac_fox_include=$fox_incdir ac_fox_ldflags=$fox_libdir ac_fox_lib=$fox_lib"
  556.                         ac_cv_have_fox="$ac_cv_have_fox ac_fox_gl=$fox_gl ac_fox_png=$fox_png ac_fox_jpg=$fox_jpg"
  557.                     else
  558.                         echo "configure: failed program was:" >&AC_FD_CC;
  559.                         cat conftest.$ac_ext >&AC_FD_CC
  560.                         rm -f conftest*
  561.                         ac_cv_have_fox="have_fox=no"
  562.                     fi
  563.  
  564.                     AC_LANG_RESTORE
  565.  
  566.                     CXXFLAGS="$ac_cxxflags_safe"
  567.                     LDFLAGS="$ac_ldflags_safe"
  568.                     LIBS="$ac_libs_safe"
  569.                 else
  570.                     ac_cv_have_fox="have_fox=no"
  571.                 fi
  572.             ])
  573.  
  574.         eval "$ac_cv_have_fox"
  575.  
  576.         if test "$have_fox" = "no"; then
  577.             AC_MSG_RESULT(no)
  578.             AC_MSG_ERROR([Please install FOX GUI library])
  579.         else
  580.             AC_MSG_RESULT([$ac_fox_version])
  581.             FOX_INCLUDES="$FOX_INCLUDES -I$ac_fox_include"
  582.             FOX_LIBS="-lFOX"
  583.             FOX_LDFLAGS="$FOX_LDFLAGS -L$ac_fox_ldflags"
  584.  
  585.             if test "$ac_fox_png" = "yes"; then
  586.                 all_libraries="$all_libraries $PNGLIB"
  587.             fi
  588.  
  589.             if test "$ac_fox_jpg" = "yes"; then
  590.                 all_libraries="$all_libraries $JPEGLIB"
  591.             fi
  592.  
  593.             if test "$ac_fox_gl" = "yes"; then
  594.                 all_includes="$all_includes $GL_INCLUDES"
  595.                 all_libraries="$all_libraries $GL_LDFLAGS $GL_LIBS"
  596.             fi
  597.  
  598.             all_includes="$all_includes $FOX_INCLUDES"
  599.             all_libraries="$all_libraries $FOX_LDFLAGS $FOX_LIBS"
  600.         fi
  601.  
  602.         AC_SUBST(FOX_INCLUDES)
  603.         AC_SUBST(FOX_LDFLAGS)
  604.         AC_SUBST(FOX_LIBS)
  605.         CXXFLAGS="$CXXFLAGS $INCLUDES $all_includes"
  606.         LDFLAGS="$LDFLAGS $all_libraries"
  607.     ])
  608.  
  609. AC_DEFUN(AC_FIND_JPEG,
  610.     [
  611.         AC_MSG_CHECKING([for JPEG lib])
  612.  
  613.         ac_jpeg_includes=""
  614.         ac_jpeg_library=""
  615.  
  616.         jpeg_libraries=""
  617.         jpeg_includes=""
  618.  
  619.         AC_ARG_WITH(jpeg,
  620.             [  --with-jpeg=DIR         where the JPEG library is installed. ],
  621.             [
  622.                 ac_jpeg_includes="$withval/include"
  623.                 ac_jpeg_library="$withval/lib"
  624.             ])
  625.  
  626.         AC_CACHE_VAL(ac_cv_have_jpeg,
  627.             [
  628.                 dnl Try to guess JPEG locations
  629.  
  630.                 if test -z "$ac_jpeg_includes"; then
  631.                     jpeg_incdirs="/usr/include /usr/local/include /opt/include"
  632.                 else
  633.                     jpeg_incdirs="$ac_jpeg_includes"
  634.                 fi
  635.  
  636.                 AC_FIND_FILE(jpeglib.h, $jpeg_incdirs, jpeg_incdir)
  637.  
  638.                 ac_cv_have_jpeg="have_jpeg=no"
  639.  
  640.                 if test "$jpeg_incdir" != "NO"; then
  641.                     if test -z "$ac_jpeg_library"; then
  642.                         jpeg_libdirs="/usr/lib /usr/local/lib /opt/lib"
  643.                     else
  644.                         jpeg_libdirs="$ac_jpeg_library"
  645.                     fi
  646.  
  647.                     jpeg_libdir=
  648.  
  649.                     AC_FIND_WILDFILE("libjpeg.*", $jpeg_libdirs, jpeg_libdir)
  650.  
  651.                     if test "$jpeg_libdir" != "NO"; then
  652.                         ac_save_LIBS="$LIBS"
  653.                         ac_save_CXXFLAGS="$CXXFLAGS"
  654.  
  655.                         AC_LANG_CPLUSPLUS
  656.  
  657.                         LIBS="$all_libraries -L$jpeg_libdir -ljpeg"
  658.                         CXXFLAGS="$CFLAGS $all_includes -I$jpeg_libdir"
  659.  
  660.                         AC_TRY_LINK(
  661.                             [
  662.     /* Override any gcc2 internal prototype to avoid an error.  */
  663.     struct jpeg_decompress_struct;
  664.     typedef struct jpeg_decompress_struct * j_decompress_ptr;
  665.     typedef int size_t;
  666. #ifdef __cplusplus
  667.     extern "C" {
  668. #endif
  669.     void jpeg_CreateDecompress(j_decompress_ptr cinfo, int version, size_t structsize);
  670. #ifdef __cplusplus
  671.     }
  672. #endif
  673.     /* We use char because int might match the return type of a gcc2
  674.         builtin and then its argument prototype would still apply.  */
  675.                             ],
  676.                             [
  677.     jpeg_CreateDecompress(0L, 0, 0);
  678.                             ],
  679.                             ac_cv_have_jpeg="have_jpeg=yes ac_jpeg_include=$jpeg_incdir ac_jpeg_ldflags=$jpeg_libdir",
  680.                             ac_cv_have_jpeg="have_jpeg=no"
  681.                         )
  682.  
  683.                         AC_LANG_RESTORE
  684.  
  685.                         LIBS="$ac_save_LIBS"
  686.                         CXXFLAGS="$ac_save_CXXFLAGS"
  687.                     fi
  688.                 fi
  689.             ])dnl
  690.  
  691.         eval "$ac_cv_have_jpeg"
  692.  
  693.         if test "$have_jpeg" != "no"; then
  694.             AC_DEFINE_UNQUOTED(HAVE_JPEGLIB, 1, [Defines if you have JPEG library])
  695.             JPEG_INCLUDES="-I$ac_jpeg_include"
  696.             JPEG_LIBS="-ljpeg"
  697.             JPEG_LDFLAGS="-L$ac_jpeg_ldflags"
  698.             have_jpeg="-ljpeg"
  699.         fi
  700.         AC_SUBST(JPEG_INCLUDES)
  701.         AC_SUBST(JPEG_LIBS)
  702.         AC_SUBST(JPEG_LDFLAGS)
  703.  
  704.         AC_MSG_RESULT($have_jpeg)
  705.     ])
  706.  
  707.  
  708. AC_DEFUN(AC_FIND_ZLIB,
  709.     [
  710.         AC_MSG_CHECKING([for Z lib])
  711.  
  712.         ac_zlib_includes=""
  713.         ac_zlib_library=""
  714.  
  715.         zlib_libraries=""
  716.         zlib_includes=""
  717.  
  718.         AC_ARG_WITH(zlib,
  719.             [  --with-zlib=DIR         where the ZLIB library is installed. ],
  720.             [
  721.                 ac_zlib_includes="$withval/include"
  722.                 ac_zlib_library="$withval/lib"
  723.             ])
  724.  
  725.         AC_CACHE_VAL(ac_cv_have_zlib,
  726.             [
  727.                 dnl Try to guess ZLIB locations
  728.  
  729.                 if test -z "$ac_zlib_includes"; then
  730.                     zlib_incdirs="/usr/include /usr/local/include /opt/include"
  731.                 else
  732.                     zlib_incdirs="$ac_zlib_includes"
  733.                 fi
  734.  
  735.                 AC_FIND_FILE(zlib.h, $zlib_incdirs, zlib_incdir)
  736.  
  737.                 ac_cv_have_zlib="have_zlib=no"
  738.                 if test "$zlib_incdir" != "NO"; then
  739.                     if test -z "$ac_zlib_library"; then
  740.                         zlib_libdirs="/usr/lib /usr/local/lib /opt/lib"
  741.                     else
  742.                         zlib_libdirs="$ac_zlib_library"
  743.                     fi
  744.  
  745.                     zlib_libdir=
  746.  
  747.                     AC_FIND_WILDFILE("libz.*", $zlib_libdirs, zlib_libdir)
  748.  
  749.                     if test "$zlib_libdir" != "NO"; then
  750.                         ac_save_LIBS="$LIBS"
  751.                         ac_save_CXXFLAGS="$CXXFLAGS"
  752.  
  753.                         AC_LANG_CPLUSPLUS
  754.  
  755.                         LIBS="$all_libraries -L$zlib_libdir -lz"
  756.                         CXXFLAGS="$CXXFLAGS $all_includes -I$zlib_libdir"
  757.  
  758.                         AC_TRY_LINK(dnl
  759.                             [
  760. #include<zlib.h>
  761.                             ],
  762.                             [
  763.     return (zlibVersion() == ZLIB_VERSION);
  764.                             ],
  765.                             ac_cv_have_zlib="have_zlib=yes ac_zlib_include=$zlib_incdir ac_zlib_ldflags=$zlib_libdir",
  766.                             ac_cv_have_zlib="have_zlib=no"
  767.                         )
  768.  
  769.                         AC_LANG_RESTORE
  770.  
  771.                         LIBS="$ac_save_LIBS"
  772.                         CXXFLAGS="$ac_save_CXXFLAGS"
  773.                     fi
  774.                 fi
  775.             ])dnl
  776.  
  777.         eval "$ac_cv_have_zlib"
  778.  
  779.         if test "$have_zlib" != "no"; then
  780.             AC_DEFINE_UNQUOTED(HAVE_LIBZ, 1, [Define if you have libz])
  781.             ZLIB_INCLUDES="-I$ac_zlib_include"
  782.             ZLIB_LIBS="-lz"
  783.             ZLIB_LDFLAGS="-L$ac_zlib_ldflags"
  784.             have_zlib="-lz"
  785.         fi
  786.         AC_SUBST(ZLIB_INCLUDES)
  787.         AC_SUBST(ZLIB_LIBS)
  788.         AC_SUBST(ZLIB_LDFLAGS)
  789.  
  790.         AC_MSG_RESULT($have_zlib)
  791.     ])
  792.  
  793.  
  794. AC_DEFUN(AC_FIND_PNG,
  795.     [
  796.         AC_REQUIRE([AC_FIND_ZLIB])
  797.  
  798.         AC_MSG_CHECKING([for PNG lib])
  799.  
  800.         ac_png_includes=""
  801.         ac_png_library=""
  802.  
  803.         png_libraries=""
  804.         png_includes=""
  805.  
  806.         AC_ARG_WITH(png,
  807.             [  --with-png=DIR          where the PNG library is installed. ],
  808.             [
  809.                 ac_png_includes="$withval/include"
  810.                 ac_png_library="$withval/lib"
  811.             ])
  812.  
  813.         AC_CACHE_VAL(ac_cv_have_png,
  814.             [
  815.                 dnl Try to guess PNG locations
  816.  
  817.                 if test -z "$ac_png_includes"; then
  818.                     png_incdirs="/usr/X11R6/include /usr/X11R6/include/X11 /usr/include /usr/local/include $x_includes"
  819.                 else
  820.                     png_incdirs="$ac_png_includes"
  821.                 fi
  822.  
  823.                 AC_FIND_FILE(png.h, $png_incdirs, png_incdir)
  824.  
  825.                 ac_cv_have_png="have_png=no"
  826.  
  827.                 if test "$png_incdir" != "NO"; then
  828.                     if test -z "$ac_png_library"; then
  829.                         png_libdirs="/usr/X11R6/lib /usr/lib /usr/local/lib $x_libraries"
  830.                     else
  831.                         png_libdirs="$ac_png_library"
  832.                     fi
  833.  
  834.                     png_libdir=
  835.                     png_lib=
  836.  
  837.                     AC_FIND_WILDFILE("libpng.*",$png_libdirs, png_libdir)
  838.  
  839.                     if test "$png_libdir" != "NO"; then
  840.                         ac_save_LIBS="$LIBS"
  841.                         ac_save_CXXFLAGS="$CXXFLAGS"
  842.  
  843.                         LIBS="$LIBS $all_libraries -L$png_libdir -lpng $ZLIB_LDFLAGS $ZLIB_LIBS -lm"
  844.                         CXXFLAGS="$CXXFLAGS $all_includes -I$png_incdir"
  845.  
  846.                         AC_LANG_SAVE
  847.                         AC_LANG_CPLUSPLUS
  848.  
  849.                         AC_TRY_LINK(dnl
  850.                             [
  851. #include <png.h>
  852.                             ],
  853.                             [
  854.     png_structp png_ptr = png_create_read_struct(/* image ptr */PNG_LIBPNG_VER_STRING, 0, 0, 0 );
  855.     return( png_ptr != 0 );
  856.                             ],
  857.                             ac_cv_have_png="have_png=yes ac_png_include=$png_incdir ac_png_ldflags=$png_libdir"
  858.                             ac_cv_have_png="$ac_cv_have_png ac_png_lib=$png_lib",
  859.                             ac_cv_have_png="have_png=no"
  860.                             )
  861.                         AC_LANG_RESTORE
  862.  
  863.                         LIBS="$ac_save_LIBS"
  864.                         CXXFLAGS="$ac_save_CXXFLAGS"
  865.                     fi
  866.                 fi
  867.             ])dnl
  868.  
  869.         eval "$ac_cv_have_png"
  870.  
  871.         if test "$have_png" != "no"; then
  872.             AC_DEFINE_UNQUOTED(HAVE_LIBPNG, 1, [Define if you have libpng])
  873.             PNG_INCLUDES="-I$ac_png_include"
  874.             PNG_LIBS="-lpng -lm"
  875.             PNG_LDFLAGS="-L$ac_png_ldflags"
  876.             have_png="$PNG_LIBS"
  877.        fi
  878.         AC_SUBST(PNG_INCLUDES)
  879.         AC_SUBST(PNG_LDFLAGS)
  880.         AC_SUBST(PNG_LIBS)
  881.  
  882.         AC_MSG_RESULT($have_png)
  883.     ])
  884.  
  885.  
  886. AC_DEFUN(AC_FIND_TIFF,
  887.     [
  888.         AC_REQUIRE([AC_FIND_ZLIB])
  889.         AC_REQUIRE([AC_FIND_JPEG])
  890.  
  891.         AC_MSG_CHECKING([for TIFF lib])
  892.  
  893.         ac_tiff_includes=""
  894.         ac_tiff_library=""
  895.  
  896.         tiff_libraries=""
  897.         tiff_includes=""
  898.  
  899.         AC_ARG_WITH(tiff,
  900.             [  --with-tiff=DIR         where the TIFF library is installed. ],
  901.             [
  902.                 ac_tiff_includes="$withval/include"
  903.                 ac_tiff_library="$withval/lib"
  904.             ])
  905.  
  906.         AC_CACHE_VAL(ac_cv_have_tiff,
  907.             [
  908.                 dnl Try to guess TIFF locations
  909.  
  910.                 if test -z "$ac_tiff_includes"; then
  911.                     tiff_incdirs="/usr/include /usr/local/include /opt/include"
  912.                 else
  913.                     tiff_incdirs="$ac_tiff_includes"
  914.                 fi
  915.  
  916.                 AC_FIND_FILE(tiff.h, $tiff_incdirs, tiff_incdir)
  917.  
  918.                 ac_cv_have_tiff="have_tiff=no"
  919.  
  920.                 if test "$tiff_incdir" != "NO"; then
  921.                     if test -z "$ac_tiff_library"; then
  922.                         tiff_libdirs="/usr/lib /usr/local/lib /opt/lib"
  923.                     else
  924.                         tiff_libdirs="$ac_png_library"
  925.                     fi
  926.  
  927.                     tiff_libdir=
  928.  
  929.                     AC_FIND_WILDFILE("libtiff.*",$tiff_libdirs, tiff_libdir)
  930.  
  931.                     if test "$tiff_libdir" != "NO"; then
  932.  
  933.                         tiff_compiled_with=
  934.  
  935.                         if test "`grep deflateInit $tiff_libdir/libtiff.*`"; then
  936.                             tiff_compiled_with="ZLIB"
  937.                             AC_REQUIRE([AC_FIND_ZLIB])
  938.                             tiff_img_libs="$ZLIB_LDFLAGS $ZLIB_LIBS"
  939.                             tiff_zlib="yes"
  940.                         fi
  941.  
  942.                         if test "`grep jpeg_read_header $tiff_libdir/libtiff.*`"; then
  943.                             if test "$tiff_compiled_with"; then
  944.                                 tiff_compiled_with="$tiff_compiled_with and JPEG"
  945.                             else
  946.                                 tiff_compiled_with="JPEG"
  947.                             fi
  948.                             AC_REQUIRE([AC_FIND_JPEG])
  949.                             tiff_img_libs="$tiff_img_libs $JPEG_LDFLAGS $JPEG_LIBS"
  950.                             tiff_jpg="yes"
  951.                         fi
  952.  
  953.                         if test "$tiff_compiled_with"; then
  954.                             tiff_compiled_with="compiled with $tiff_compiled_with support"
  955.                         fi
  956.                         AC_LANG_SAVE
  957.                         AC_LANG_CPLUSPLUS
  958.  
  959.                         ac_cxxflags_safe="$CXXFLAGS"
  960.                         ac_libs_safe="$LIBS"
  961.  
  962.                         CXXFLAGS="$CXXFLAGS -I$tiff_incdir"
  963.                         LIBS="$LIBS -L$tiff_libdir $tiff_img_libs -ltiff"
  964.  
  965.  
  966.                         AC_TRY_LINK(dnl
  967.                             [
  968. #include <tiffio.h>
  969.                             ],
  970.                             [
  971.     return (TIFFOpen("", "r") == 0);
  972.                             ],
  973.                             ac_cv_have_tiff="have_tiff=yes ac_tiff_include=$tiff_incdir ac_tiff_ldflags=$tiff_libdir ac_tiff_with=\"$tiff_compiled_with\"",
  974.                             ac_cv_have_tiff="have_tiff=no"
  975.                         )
  976.  
  977.                         LIBS="$ac_libs_save"
  978.                         CXXFLAGS="$ac_cxxflags_save"
  979.                         AC_LANG_RESTORE
  980.                     fi
  981.                 fi
  982.             ])
  983.  
  984.         eval "$ac_cv_have_tiff"
  985.  
  986.         if test "$have_tiff" != "no"; then
  987.             AC_DEFINE_UNQUOTED(HAVE_TIFFLIB, 1, [Defines if you have TIFF library])
  988.             TIFF_INCLUDES="-I$ac_tiff_include"
  989.             TIFF_LIBS="-ltiff"
  990.             TIFF_LDFLAGS="-L$ac_tiff_ldflags"
  991.             have_tiff="-ltiff $ac_tiff_with"
  992.         fi
  993.         AC_SUBST(TIFF_INCLUDES)
  994.         AC_SUBST(TIFF_LIBS)
  995.         AC_SUBST(TIFF_LDFLAGS)
  996.  
  997.         AC_MSG_RESULT([$have_tiff])
  998.     ])
  999.  
  1000.  
  1001. AC_DEFUN(AC_CHECK_STL_SGI,
  1002.     [
  1003.         AC_MSG_CHECKING([if STL implementation is SGI like])
  1004.         AC_CACHE_VAL(ac_cv_stl_type_sgi,
  1005.             [
  1006.                 AC_TRY_COMPILE(
  1007.                     [
  1008. #include <string>
  1009.     using namespace std;
  1010.                     ],
  1011.                     [
  1012.     string astring="Hallo Welt.";
  1013.     astring.erase(0, 6); // now astring is "Welt"
  1014.     return 0;
  1015.                     ],
  1016.                         ac_cv_stl_type_sgi=yes,
  1017.                         ac_cv_stl_type_sgi=no
  1018.                     )
  1019.             ])
  1020.  
  1021.         AC_MSG_RESULT($ac_cv_stl_type_sgi)
  1022.  
  1023.         if test "$ac_cv_stl_type_sgi" = "yes"; then
  1024.             AC_DEFINE_UNQUOTED(HAVE_SGI_STL, 1, [Define if you have a STL implementation by SGI])
  1025.         fi
  1026.     ])
  1027.  
  1028.  
  1029. AC_DEFUN(AC_CHECK_STL_HP,
  1030.     [
  1031.         AC_MSG_CHECKING([if STL implementation is HP like])
  1032.         AC_CACHE_VAL(kde_cv_stl_type_hp,
  1033.             [
  1034.                 AC_TRY_COMPILE(
  1035.                     [
  1036. #include <string>
  1037.     using namespace std;
  1038.                     ],
  1039.                     [
  1040.     string astring="Hello World";
  1041.     astring.remove(0, 6); // now astring is "World"
  1042.     return 0;
  1043.                     ],
  1044.                         ac_cv_stl_type_hp=yes,
  1045.                         ac_cv_stl_type_hp=no
  1046.                     )
  1047.             ])
  1048.         AC_MSG_RESULT($ac_cv_stl_type_hp)
  1049.  
  1050.         if test "$ac_cv_stl_type_hp" = "yes"; then
  1051.             AC_DEFINE_UNQUOTED(HAVE_HP_STL, 1, [Define if you have a STL implementation by SGI])
  1052.         fi
  1053.     ])
  1054.  
  1055.  
  1056.  
  1057. AC_DEFUN(AC_CHECK_STL,
  1058.     [
  1059.         AC_LANG_SAVE
  1060.         AC_LANG_CPLUSPLUS
  1061.         AC_CHECK_STL_SGI
  1062.  
  1063.         if test "$ac_cv_stl_type_sgi" = "no"; then
  1064.             AC_CHECK_STL_HP
  1065.  
  1066.             if test "$ac_cv_stl_type_hp" = "no"; then
  1067.                 AC_MSG_ERROR("no known STL type found")
  1068.             fi
  1069.         fi
  1070.  
  1071.         AC_LANG_RESTORE
  1072.     ])
  1073.  
  1074.  
  1075. AC_DEFUN(AC_CHECK_FREETYPE2,
  1076.     [
  1077.         AC_REQUIRE([AC_PROG_CC])
  1078.  
  1079.         AC_MSG_CHECKING([for FreeType 2])
  1080.  
  1081.         ac_ft_config="freetype-config"
  1082.  
  1083.         ft_libraries=""
  1084.         ft_includes=""
  1085.         ft_version=""
  1086.  
  1087.         AC_ARG_WITH(ft2,
  1088.             [  --with-ft2=DIR          where the FreeType 2 library is installed. ],
  1089.             [
  1090.                 ac_ft_config="$withval/bin/freetype-config"
  1091.             ])
  1092.  
  1093.         AC_CACHE_VAL(ac_cv_have_ft,
  1094.             [
  1095.                 ft_includes=`$ac_ft_config --cflags`
  1096.                 ft_libraries=`$ac_ft_config --libs`
  1097.                 ft_version=`$ac_ft_config --version | sed -e 's/://g'`
  1098.  
  1099.                 if test -z "$ft_includes" -o -z "$ft_libraries"; then
  1100.                     ac_cv_have_ft="have_ft=no"
  1101.                 else
  1102.                     if test $ft_version -lt 610; then
  1103.                         ac_cv_have_ft="have_ft=no"
  1104.                     else
  1105.                         ac_cv_have_ft="have_ft=yes ac_ft_includes=$ft_includes ac_ft_libraries=\"$ft_libraries\""
  1106.                     fi
  1107.                 fi
  1108.  
  1109.  
  1110.             ])
  1111.  
  1112.         eval "$ac_cv_have_ft"
  1113.  
  1114.         if test "$have_fox" = "no"; then
  1115.             AC_MSG_RESULT(no)
  1116.             AC_MSG_ERROR([Please install FreeType 2 library])
  1117.         else
  1118.             AC_MSG_RESULT(yes)
  1119.             FT_INCLUDES="$ac_ft_includes"
  1120.             FT_LIBS="$ac_ft_libraries"
  1121.             all_includes="$all_includes $FT_INCLUDES"
  1122.             all_libraries="$all_libraries $FT_LIBS"
  1123.  
  1124.         fi
  1125.  
  1126.         AC_SUBST(FT_INCLUDES)
  1127.         AC_SUBST(FT_LIBS)
  1128.  
  1129.         CXXFLAGS="$CXXFLAGS $INCLUDES $all_includes"
  1130.         LDFLAGS="$LDFLAGS $all_libraries"
  1131.     ])
  1132.  
  1133.