editing configure scripts

Developers
Jesse
2009-02-01
2013-05-02
  • Jesse

    Jesse - 2009-02-01

    When I patched 1.6.8 there was a section within file "configure.ac" where I could put my header/library file tests so that certain macros would be defined. This section doesn't exist within this file anymore, but I need to add another header test. What file and where in it do I do this now?

     
    • Matěj Týč

      Matěj Týč - 2009-02-01

      Regarding X11 tests, look at file m4/devil-api-checks.m4 around line 120 (the SETTLE_X11 macro). Every X11 related macros should be there.
      SETTLE_X11 gets called only if people want to build ILUT and the configure.ac is kept short.
      Please ask if you have any questions or doubts!
      Matej

       
    • Jesse

      Jesse - 2009-02-02

      Thank you. I made the edit and then ran "autoreconf"  followed by a "./configure" only to get the following error:

      ./configure: line 27519: syntax error: unexpected end of file

      Here's the whole section with the changes I've made. I basically just mimicked the code that was there already.

      AC_DEFUN([SETTLE_X11],
      [TEST_API(x11)
      TEST_API(shm)
      TEST_API(render)
      AS_IF([test "x$enable_x11" = "xyes"],
            [AC_CHECK_HEADER([X11/Xlib.h],
                             [use_x11="yes"],
                             [use_x11="no"])
             AC_CHECK_LIB([X11],
                          [main],
                          [use_x11="yes"
                           ILUT_LIBS="-lX11 $ILUT_LIBS"],
                          [use_x11="no"]) ])
      AS_IF([test "x$enable_shm" = "xyes"],
            [AC_CHECK_HEADER([X11/extensions/XShm.h],
                             [use_xshm="yes"],
                             [use_xshm="no"],
                             [[#include <X11/Xlib.h>]])
             AC_CHECK_LIB([Xext],
                          [main],
                          [use_shm="yes"
                           ILUT_LIBS="-lXext $ILUT_LIBS"],
                          [use_shm="no"]) ])
      AS_IF([test 'x$enable_render" = "xyes"],
            [AC_CHECK_HEADER([X11/extensions/Xrender.h],
                             [use_xrender="yes"],
                             [use_xrender="no"],
                             [[#include <X11/Xlib.h>]])
             AC_CHECK_LIB([Xrender],
                          [main],
                          [use_render="yes"
                           ILUT_LIBS="-lXrender $ILUT_LIBS"],
                          [use_render="no"]) ])

      AS_IF([test "x$use_x11" != "xno"],
                   [AC_DEFINE([ILUT_USE_X11],
                              [],
                              [Support X11 API])
                    SUPPORTED_API=$SUPPORTED_API"X11 "])
      dnl              AS_CASE([$target],
      dnl                   [*apple-darwin*],
      dnl                   [LIBX11="$LIBX11 -L/usr/X11R6/lib"])
      AS_IF([test "$use_xshm" = "yes"],
                          [AC_DEFINE([ILUT_USE_XSHM],
                                     [],
                                     [Support X11 XShm extension])
                           SUPPORTED_API=$SUPPORTED_API"XShm "])
      AS_IF([test "$use_xrender" = "yes"],
                          [AC_DEFINE([ILUT_USE_XRENDER],
                                     [],
                                     [Support X11 XRender extension])
                           SUPPORTED_API=$SUPPORTED_API"XRender "]) ])

       
      • Matěj Týč

        Matěj Týč - 2009-02-02

        The culprit is in this line, notice the swap of ' and " :-)
        AS_IF([test 'x$enable_render" = "xyes"],

        The build system has been updated using your contribution, thank you!

         
    • Jesse

      Jesse - 2009-02-03

      Of course, it had to be something simple. Thank you!

       

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks