Changeset 429497 in git for factory/configure.ac


Ignore:
Timestamp:
Jan 31, 2012, 9:49:02 PM (12 years ago)
Author:
Julien Puydt <julien.puydt@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
461f404f27ec9987b968899b7005d7a2558ad4b3
Parents:
c2e8c5044ea364ea7100d35065206c3d3258f96a
git-author:
Julien Puydt <julien.puydt@laposte.net>2012-01-31 21:49:02+01:00
git-committer:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2012-02-03 17:52:05+01:00
Message:
Modified the omalloc configuration for factory/ and made toplevel use it

The factory/ configure now has four options for omalloc:
 --enable-omalloc
 --with-omalloc-dir=<path> (to point to omalloc's main install)
 --with-omalloc-extra-dir=<path> (in case there needs a second
                                  -- think out-of-tree builds)
 --enable-omalloc-trust (to trust omalloc will be found at build-time
                         but don't check at configure-time)

That last is especially useful to build factory/ inside singular,
because in that case, omalloc.h includes omTables.h... which will exist
only during the build!

Finally, the toplevel Makefile.am and configure.ac are modified, so
that the correct options are passed to factory/configure.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • factory/configure.ac

    rc2e8c5 r429497  
     1
    12dnl # emacs edit mode for this file is -*- sh -*-
    23dnl # $Id$
     
    4849  [with_Singular=yes])
    4950
    50 
    51 AC_ARG_WITH(
    52   omalloc,
    53   [AS_HELP_STRING([--with-omalloc],[build for use with omalloc])])
    54 
     51AC_ARG_ENABLE(omalloc, AS_HELP_STRING([--enable-omalloc],[build for use with omalloc]),
     52[if test "x$enableval" = "xyes"; then
     53  enable_omalloc=yes
     54fi], enable_omalloc=no)
     55
     56AC_ARG_ENABLE(omalloc_trust, AS_HELP_STRING([--enable-omalloc-trust],[do not check the omalloc header]),
     57[if test "x$enableval" = "xyes"; then
     58  omalloc_trust=yes
     59fi], omalloc_trust=no)
     60
     61AC_ARG_WITH(omalloc_dir,[AS_HELP_STRING([--with-omalloc-dir=PTH],[location of omalloc])], with_omalloc_dir="$withval", with_omalloc_dir="")
     62
     63AC_ARG_WITH(omalloc_extra_dir,[AS_HELP_STRING([--with-omalloc-extra-dir=PTH],[optional extra location of omalloc])], with_omalloc_extra_dir="$withval", with_omalloc_extra_dir="")
    5564
    5665AC_ARG_ENABLE(
     
    228237fi
    229238
    230 AC_CHECK_HEADERS(omalloc.h,,)
    231 
    232239# font-lock-trick: '
    233240
     
    352359#fi
    353360
     361AH_TEMPLATE([HAVE_OMALLOC], [define if build with OMALLOC])
    354362AC_MSG_CHECKING(whether to use omalloc)
    355 
    356 if test "$with_omalloc" = yes; then
    357   if test "$ac_cv_header_omalloc_h" != yes; then
    358     if test "$enable_omalloc" = yes; then
    359        warn_omalloc=yes
    360     else
    361        with_omalloc=no
     363if test "$enable_omalloc" = yes; then
     364
     365  AC_MSG_RESULT(yes)
     366  CPPFLAGS_save="$CPPFLAGS"
     367  if test "x$with_omalloc_dir" != "x"; then
     368    OMALLOC_CFLAGS="-I${with_omalloc_dir}"
     369  fi
     370  if test "x$with_omalloc_extra_dir" != "x"; then
     371    OMALLOC_CFLAGS="$OMALLOC_CFLAGS -I${with_omalloc_extra_dir}"
     372  fi
     373  if test $omalloc_trust = no; then
     374    AC_CHECK_HEADERS(omalloc/omalloc.h)
     375    if test "$ac_cv_header_omalloc_omalloc_h" != yes; then
     376      AC_MSG_ERROR([You asked for omalloc, but it was not found])
    362377    fi
     378  else
     379    AC_MSG_NOTICE(trusting the omalloc locations given)
     380    AC_MSG_RESULT()
    363381  fi
     382  AC_DEFINE(HAVE_OMALLOC,1, [omalloc support])
     383  AC_SUBST(OMALLOC_CFLAGS)
    364384else
    365   if test "$with_omalloc" != no; then
    366     if test "$enable_omalloc" = yes; then
    367       if test "$ac_cv_header_omalloc_h" != yes; then
    368         warn_omalloc=yes
    369       fi
    370       with_omalloc=yes
    371     else
    372       with_omalloc=no
    373     fi
    374   fi
    375 fi
    376 
    377 AH_TEMPLATE([HAVE_OMALLOC], [define if build with OMALLOC])
    378 if test "$with_omalloc" = yes; then
    379   AC_DEFINE([HAVE_OMALLOC],[1])
    380 fi
    381 AC_MSG_RESULT($with_omalloc)
    382 if test "$warn_omalloc" = yes; then
    383   AC_MSG_WARN(did not find omalloc.h -- install before compiling)
     385  AC_MSG_RESULT(no)
    384386fi
    385387
Note: See TracChangeset for help on using the changeset viewer.