[tex-live] location of t1* binaries

Eddie Kohler kohler at cs.ucla.edu
Sat Oct 9 08:54:49 CEST 2004


Thomas Esser wrote:
> On Tue, Oct 05, 2004 at 04:21:52PM -0700, Eddie Kohler wrote:
> 
>>Thanks for the patch to lcdf-typetools configure.in.  I've implemented 
>>a slightly different one; the entire configure.in is attached.  It 
>>expects TeX Live to supply the configuration argument 
>>'--with-kpathsea=texk-local'.
> 
> 
> That's fine.
> 
> 
>>Let me know if it fails for you.
> 
> 
> It fails.


Hi Thomas,

Thanks for the notes.  The following lcdf-typetools configure.in works now for 
me, with a teTeX non-source-tree build.  Rather than 
'--with-kpathsea=texk-local', it now expects you to supply the configuration 
argument '--enable-tetex-build'.  Let me know how it works.

Eddie

-------------- next part --------------
dnl Process this file with autoconf to produce a configure script.
AC_INIT(NEWS)
AM_INIT_AUTOMAKE(lcdf-typetools, 2.15)
AM_CONFIG_HEADER(config.h)
AM_MAINTAINER_MODE

AC_PROG_MAKE_SET

AC_PROG_CC
AC_PROG_CPP
AC_PROG_CXX
AC_PROG_CXXCPP
if test -n "$GCC" ; then CC="$CC -W -Wall" ; CXX="$CXX -W -Wall" ; fi

dnl AN_MAKEVAR([AR], [AC_PROG_AR])
dnl AN_PROGRAM([ar], [AC_PROG_AR])
dnl AC_DEFUN([AC_PROG_AR], [AC_CHECK_TOOL(AR, ar, :)])
dnl AC_PROG_AR

AC_PROG_RANLIB


dnl Available from the GNU Autoconf Macro Archive at:
dnl http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_template_objs.html
dnl
AC_DEFUN([AC_CXX_TEMPLATE_OBJS],
[AC_CACHE_CHECK(where template objects are stored, ac_cv_cxx_templobjs,
 [ ac_cv_cxx_templobjs='unknown'
   if test "$GXX" = yes; then
     ac_cv_cxx_templobjs='nowhere'
   else
     case $CXX in
       CC|*/CC)
        cat > conftest.cc <<EOF
template<class T> class A { public : A () {} };
template<class T> void f (const A<T>&) {}
main()
{ A<double> d;
  A<int> i;
  f (d);
  f (i);
  return 0;
}
EOF
        if test "$ac_cv_cxx_templobjs" = 'unknown' ; then
          if test -d Templates.DB ; then
            rm -fr Templates.DB
          fi
          if $CXX $CXXFLAGS -ptr. -c conftest.cc 1> /dev/null 2>&1; then
            if test -d Templates.DB ; then
#             this should be Sun CC <= 4.2
              CXXFLAGS="$CXXFLAGS -ptr."
              if test x"$LIBTOOL" = x ; then
                ac_cv_cxx_templobjs='Templates.DB/*.o'
              else
                ac_cv_cxx_templobjs='Templates.DB/*.lo'
              fi
              rm -fr Templates.DB
            fi
          fi
        fi
        if test "$ac_cv_cxx_templobjs" = 'unknown' ; then
          if test -d SunWS_cache ; then
            rm -fr SunWS_cache
          fi
          if $CXX $CXXFLAGS -c conftest.cc 1> /dev/null 2>&1; then
            if test -d SunWS_cache ; then
#             this should be Sun WorkShop C++ compiler 5.x
#             or Sun Forte C++ compiler >= 6.x
              if test x"$LIBTOOL" = x ; then
                ac_cv_cxx_templobjs='SunWS_cache/*/*.o'
              else
                ac_cv_cxx_templobjs='SunWS_cache/*/*.lo'
              fi
              rm -fr SunWS_cache
            fi
          fi
        fi
        rm -f conftest* ;;
     esac
   fi
   case "x$ac_cv_cxx_templobjs" in
     xunknown|xnowhere)
     TEMPLATE_OBJS="" ;;
     *)
     TEMPLATE_OBJS="$ac_cv_cxx_templobjs" ;;
   esac
   AC_SUBST(TEMPLATE_OBJS)])])

AC_CXX_TEMPLATE_OBJS


dnl
dnl directory searching
dnl

AC_HEADER_DIRENT


dnl
dnl select programs to be compiled
dnl

AC_ARG_ENABLE(cfftot1, [  --disable-cfftot1       do not build the cfftot1 program], :, enable_cfftot1=yes)
AC_ARG_ENABLE(mmafm, [  --disable-mmafm         do not build the mmafm program], :, enable_mmafm=yes)
AC_ARG_ENABLE(mmpfb, [  --disable-mmpfb         do not build the mmpfb program], :, enable_mmpfb=yes)
AC_ARG_ENABLE(otfinfo, [  --disable-otfinfo       do not build the otfinfo program], :, enable_otfinfo=yes)
AC_ARG_ENABLE(otftotfm, [  --disable-otftotfm      do not build the otftotfm program], :, enable_otftotfm=yes)
AC_ARG_ENABLE(t1lint, [  --disable-t1dotlessj    do not build the t1dotlessj program], :, enable_t1dotlessj=yes)
AC_ARG_ENABLE(t1lint, [  --disable-t1lint        do not build the t1lint program], :, enable_t1lint=yes)
AC_ARG_ENABLE(t1testpage, [  --disable-t1testpage    do not build the t1testpage program], :, enable_t1testpage=yes)

SELECTED_SUBDIRS=''
for i in cfftot1 mmafm mmpfb otfinfo otftotfm t1dotlessj t1lint t1testpage; do
    y=`eval 'echo $enable_'"$i"`
    if test "x$y" != xno; then SELECTED_SUBDIRS="$SELECTED_SUBDIRS $i"; fi
done
AC_SUBST(SELECTED_SUBDIRS)


dnl
dnl kpathsea, auto-cfftot1
dnl

AC_ARG_ENABLE(tetex-build, [  --enable-tetex-build    build as part of a teTeX installation], :, enable_tetex_build=no)
AC_ARG_WITH(kpathsea, [  --with-kpathsea=PREFIX  Kpathsea is installed (under PREFIX)],
  [kpathsea=$withval], [kpathsea=])

if test "x$kpathsea" = xno; then
    KPSEINTERFACE_O=
    LIBKPATHSEA=
else
    if test "x$enable_tetex_build" = xyes; then
	if test ! -d $srcdir/../../texk/kpathsea; then
	    AC_MSG_ERROR([
=========================================

You specified --enable-tetex-build, but I can't find the kpathsea
directory.  I expected it to be in $srcdir/../../texk/kpathsea.

=========================================])
	fi
	CPPFLAGS="$CPPFLAGS -I\$(top_builddir)/../../texk -I\$(top_srcdir)/../../texk"
	LDFLAGS="$LDFLAGS -L\$(top_builddir)/../../texk/kpathsea/.libs"
    elif test "x$kpathsea" != x -a "x$kpathsea" != xyes; then
	CPPFLAGS="$CPPFLAGS -I$kpathsea/include"
	LDFLAGS="$LDFLAGS -L$kpathsea/lib"
    else
	kpathsea=yes
    fi

    dnl check for kpathsea/kpathsea.h
    AC_CHECK_HEADER(kpathsea/kpathsea.h, [kpse_header=yes], [kpse_header=no])

    dnl if not found and kpathsea prefix not set, check /usr/local
    if test "x$kpse_header" != xyes -a "x$kpathsea" = xyes -a -r /usr/local/include/kpathsea/tex-file.h; then
	CPPFLAGS="$CPPFLAGS -I/usr/local/include"
	LDFLAGS="$LDFLAGS -L/usr/local/lib"
	AC_CHECK_HEADER(kpathsea/tex-file.h, [kpse_header=yes], [kpse_header=no])
    fi

    dnl check for -lkpathsea
    if test "x$enable_tetex_build" = xyes; then
	kpse_library=yes
    else
	AC_CHECK_LIB(kpathsea, kpse_set_program_name, [kpse_library=yes], [kpse_library=no])
    fi

    dnl bail out if not found
    if test "x$kpse_header" != xyes -o "x$kpse_library" != xyes; then
	AC_MSG_ERROR([
=========================================

I can't find the kpathsea library and/or header files. Tell me where to look
using the --with-kpathsea=PREFIX option (header files should be under
PREFIX/include/kpathsea, and library under PREFIX/lib), or disable support
using --without-kpathsea.

=========================================])
    fi

    dnl OK, found
    AC_DEFINE(HAVE_KPATHSEA, 1, [Define if you want to use kpathsea.])
    KPSEINTERFACE_O='kpseinterface.$(OBJEXT)'
    if test "x$enable_tetex_build" = xyes; then
	LIBKPATHSEA='$(top_builddir)/../../texk/kpathsea/.libs/libkpathsea.a'
    else
	LIBKPATHSEA='-lkpathsea'
    fi
fi
AC_SUBST([KPSEINTERFACE_O])
AC_SUBST([LIBKPATHSEA])

AC_ARG_ENABLE(selfauto-set, [  --disable-selfauto-set  disable setting SELFAUTO variables from kpsewhich], :, enable_selfauto_set=yes)

if test "x$enable_selfauto_set" = xyes -a "x$kpathsea" != xno -a "x$enable_tetex_build" != xyes; then
    kpsewhich='kpsewhich'
    test "x$kpathsea" != xyes -a -x "$kpathsea/bin/kpsewhich" && kpsewhich="$kpathsea/bin/kpsewhich"
    SELFAUTOLOC=`$kpsewhich --expand-var='$SELFAUTOLOC' 2>/dev/null`
    SELFAUTODIR=`$kpsewhich --expand-var='$SELFAUTODIR' 2>/dev/null`
    SELFAUTOPARENT=`$kpsewhich --expand-var='$SELFAUTOPARENT' 2>/dev/null`
    if test -z "$SELFAUTODIR"; then
	AC_MSG_WARN([
=========================================

Could not extract SELFAUTO variables from $kpsewhich.
Either supply the correct PREFIX to --with-kpathsea, or supply
--disable-selfauto-loc.

=========================================])
    fi
    AC_DEFINE_UNQUOTED(SELFAUTOLOC, "$SELFAUTOLOC", [kpsewhich's $SELFAUTOLOC variable])
    AC_DEFINE_UNQUOTED(SELFAUTODIR, "$SELFAUTODIR", [kpsewhich's $SELFAUTODIR variable])
    AC_DEFINE_UNQUOTED(SELFAUTOPARENT, "$SELFAUTOPARENT", [kpsewhich's $SELFAUTOPARENT variable])
fi

AC_ARG_ENABLE(auto-cfftot1, [  --disable-auto-cfftot1  disable running cfftot1 from otftotfm], :, enable_auto_cfftot1=yes)
AC_ARG_ENABLE(auto-t1dotlessj, [  --disable-auto-t1dotlessj disable running t1dotlessj from otftotfm], :, enable_auto_t1dotlessj=yes)

if test "x$enable_auto_cfftot1" = xyes; then
    AC_DEFINE(HAVE_AUTO_CFFTOT1, 1, [Define to run cfftot1 automatically from otftotfm.])
fi
if test "x$enable_auto_t1dotlessj" = xyes; then
    AC_DEFINE(HAVE_AUTO_T1DOTLESSJ, 1, [Define to run t1dotlessj automatically from otftotfm.])
fi


dnl
dnl <new> and/or <new.h>
dnl

AC_LANG_CPLUSPLUS
AC_CACHE_CHECK([whether <new> works], ac_cv_good_new_hdr,
[AC_TRY_LINK([#include <new>], [
  int a;
  int *b = new(&a) int;
  return 0;
], ac_cv_good_new_hdr=yes, ac_cv_good_new_hdr=no)])
if test "$ac_cv_good_new_hdr" = yes; then
   AC_DEFINE(HAVE_NEW_HDR, 1, [Define if <new> exists and works.])
fi
AC_CHECK_HEADERS(new.h)


dnl
dnl functions such as strerror, working strtod, strtoul, time
dnl headers such as unistd.h
dnl

AC_LANG_C
FIXLIBC_O=''
AC_CHECK_FUNCS(strerror, :, FIXLIBC_O='fixlibc.o')

AC_CACHE_CHECK(whether strtod works, ac_cv_working_strtod,
[AC_TRY_RUN([#include <stdio.h>
#include <stdlib.h>
int main(int c, char **v) {
  char s[] = "12 ";
  char *endp;
  double d = strtod(s, &endp);
  exit(*endp == 0 ? 1 : 0);
}], ac_cv_working_strtod=yes, ac_cv_working_strtod=no,
ac_cv_working_strtod=yes)])
if test $ac_cv_working_strtod = no; then 
    FIXLIBC_O='fixlibc.o'
    AC_DEFINE(BROKEN_STRTOD, 1, [Define if strtod is broken.])
fi

AC_CHECK_FUNCS(strtoul ctime mkstemp ftruncate sigaction waitpid)
AC_CHECK_FUNC(floor, :, [AC_CHECK_LIB(m, floor)])
AC_CHECK_FUNC(fabs, :, [AC_CHECK_LIB(m, fabs)])
AC_CHECK_HEADERS(unistd.h fcntl.h sys/time.h sys/wait.h)

AC_SUBST(FIXLIBC_O)


dnl
dnl integer types
dnl

AC_CHECK_HEADERS(inttypes.h, have_inttypes_h=yes, have_inttypes_h=no)
AC_CHECK_HEADERS(sys/types.h, have_sys_types_h=yes, have_sys_types_h=no)

if test $have_inttypes_h = no -a $have_sys_types_h = yes; then
    AC_CACHE_CHECK([for uintXX_t typedefs], ac_cv_uint_t,
    [AC_EGREP_HEADER(dnl
changequote(<<,>>)<<(^|[^a-zA-Z_0-9])uint32_t[^a-zA-Z_0-9]>>changequote([,]),
    sys/types.h, ac_cv_uint_t=yes, ac_cv_uint_t=no)])
fi
if test $have_inttypes_h = no -a $have_sys_types_h = yes -a "$ac_cv_uint_t" = no; then
    AC_CACHE_CHECK([for u_intXX_t typedefs], ac_cv_u_int_t,
    [AC_EGREP_HEADER(dnl
changequote(<<,>>)<<(^|[^a-zA-Z_0-9])u_int32_t[^a-zA-Z_0-9]>>changequote([,]),
    sys/types.h, ac_cv_u_int_t=yes, ac_cv_u_int_t=no)])
fi
if test $have_inttypes_h = yes -o "$ac_cv_uint_t" = yes; then
    :
elif test "$ac_cv_u_int_t" = yes; then
    AC_DEFINE(HAVE_U_INT_TYPES, 1, [Define if you have u_intXX_t types but not uintXX_t types.])
else
    AC_MSG_WARN([
=========================================

Neither uint32_t nor u_int32_t defined by <inttypes.h> or <sys/types.h>!
Assuming "short" has 16 bits and "int" has 32 bits.

=========================================])
    AC_DEFINE(HAVE_FAKE_INT_TYPES, 1, [Define if intXX_t types are not available.])
fi

AC_CHECK_TYPES(uintptr_t, [], [],
[#if HAVE_INTTYPES_H
# include <inttypes.h>
#endif
#if HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
])

AC_CHECK_SIZEOF(void *)
AC_CHECK_SIZEOF(unsigned long)
AC_CHECK_SIZEOF(unsigned int)


dnl
dnl ntohs, ntohl (need them in C++ code)
dnl

AC_LANG_CPLUSPLUS
AC_CHECK_HEADERS(byteorder.h netinet/in.h sys/param.h)
AC_MSG_CHECKING([whether ntohs and ntohl are defined])
AC_COMPILE_IFELSE(
	[AC_LANG_PROGRAM([[#if HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#if HAVE_BYTEORDER_H
# include <byteorder.h>
#elif HAVE_NETINET_IN_H
# include <netinet/in.h>
#elif HAVE_SYS_PARAM_H
# include <sys/param.h>
#endif
]], [[(void) ntohs(0x0020), (void) ntohl(0x03040020);]])],
	[AC_MSG_RESULT(yes)],
	[AC_MSG_RESULT(no)
    AC_MSG_ERROR([
=========================================

Cannot find a definition for ntohs and/or ntohl!

=========================================])])
AC_LANG_C


dnl
dnl is va_list addressable?
dnl

AC_LANG_CPLUSPLUS
AC_CACHE_CHECK([for addressable va_list type], 
    ac_cv_va_list_addr,
    [AC_TRY_COMPILE([#include <stdarg.h>
void f(va_list *) {
}
void g(va_list val) {
    f(&val);
}
void h(int a, ...) {
    va_list val;
    va_start(val, a);
    g(val);
    va_end(val);
}], [h(2, 3, 4);], ac_cv_va_list_addr=yes, ac_cv_va_list_addr=no)])
if test "x$ac_cv_va_list_addr" = xyes; then
    AC_DEFINE(HAVE_ADDRESSABLE_VA_LIST, 1, [Define if the va_list type is addressable.])
fi


dnl
dnl verbatim portions of the header
dnl

AC_DEFINE(HAVE_PERMSTRING, 1, [Define if PermStrings are available.])
AC_DEFINE(MMAFM_RUN_MMPFB, 1, [Define to 0 if you don't want mmafm to run mmpfb when it needs to get an intermediate master conversion program.])
dnl PATHNAME_SEPARATOR?

AH_TOP([#ifndef LCDF_TYPETOOLS_CONFIG_H
#define LCDF_TYPETOOLS_CONFIG_H])

AH_BOTTOM([/* Allow compilation on Windows (thanks, Fabrice Popineau). */
#ifdef WIN32
# include <win32lib.h>
#else
# define CDECL /* nothing */
#endif

#ifdef __cplusplus
extern "C" {
#endif

/* Prototype strerror if we don't have it. */
#if !HAVE_STRERROR
char *strerror(int errno);
#endif

/* Prototype good_strtod if we need it. */
#if BROKEN_STRTOD
double good_strtod(const char *nptr, char **endptr);
#endif

#ifdef __cplusplus
}
/* Get rid of a possible inline macro under C++. */
# define inline inline
#endif

#endif /* LCDF_TYPETOOLS_CONFIG_H */])


dnl
dnl set path variables
dnl

shell_expand () {
  val=`eval echo '$'"$1"`
  while echo "x$val" | fgrep '$' >/dev/null 2>&1; do val=`eval echo "$val"`; done
  eval "$1='$val'"
}

dnl Preset $prefix and $exec_prefix.
test "x$prefix" = xNONE && prefix=$ac_default_prefix
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'

shell_expand datadir

AC_DEFINE_UNQUOTED(SHAREDIR, "$datadir/lcdf-typetools", [Data directory.])


dnl
dnl Output
dnl

AC_OUTPUT(Makefile liblcdf/Makefile libefont/Makefile t1lint/Makefile t1testpage/Makefile cfftot1/Makefile mmafm/Makefile mmpfb/Makefile otfinfo/Makefile otftotfm/Makefile t1dotlessj/Makefile)


More information about the tex-live mailing list