summaryrefslogtreecommitdiff
path: root/Build/source/README
blob: eb02ce320ed1e80d8facd3d2f7f1a061a9d2284a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
$Id$
Copyright (C) 2004, 2006 TeX Users Group.
You may freely use, modify and/or distribute this file.
(Originally written in 2004 by Karl Berry.)

To build the source tree, run ./Build.
To build (mostly) without optimization, try CFLAGS=-g Build.

- Bison and Flex are needed for web2c.
- libfontconfig (development) must be present for XeTeX to build, except
  on MacOSX.
- A terminal (development) library such as libncurses must be present for
  Texinfo to build.

The binaries will be left in ./inst/bin/<stdplatform>.
Don't worry about the other files and directories in inst.

If you are going to check them in yourself, copy the binaries to
texmf/bin/<tlplatform> and svn add/remove/commit them.


Running ./reautoconf here reruns autoconf, both old (the hacked 2.13
we have here) and new (assumed to be in /usr/bin/autoconf).

Automadness:
should be oldest > newest in this order (often used alternate names
in parentheses):
    Makefile.am  >  configure.ac (configure.in)
    Makefile.in  >  config.h.in (config.hin)      > configure
        
To rerun dvipdfmx:
  until integration, insert our configure.in, data/Makefile.am,
    src/Makefile.am changes, copy compile script.
  p4 edit config.h.in aclocal.m4 configure Makefile.in */Makefile.in
  aclocal; autoheader; automake; autoconf
  touch config.h.in; sleep 1; touch Makefile.in  # shouldn't be needed, but ...

Build information:
  i386-darwin: i686-apple-darwin8.1.0 built by Gerben Wierda, from
    http://bloch.ling.yale.edu/i-packages/experimental/tex.ii2/tex.30.tar.bz2

  powerpc-darwin: powerpc-apple-darwin6.8 built by Gerben Wierda, from
    http://bloch.ling.yale.edu/i-packages/experimental/tex.ii2/tex.26.tar.bz2

  x86_64-linux: built by Tigran Aivazian, from
    http://www.bibles.org.uk/x86_64
# uname -a
Linux elpis 2.6.8.1 #18 SMP Fri Mar 25 19:46:16 GMT 2005 x86_64 x86_64 x86_64 G$
# gcc -v
Reading specs from /usr/lib/gcc-lib/x86_64-redhat-linux/3.3.3/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--disable-checking --disable-libunwind-exceptions --with-system-zlib
--enable-__cxa_atexit --host=x86_64-redhat-linux
Thread model: posix
gcc version 3.3.3 20040412 (Red Hat Linux 3.3.3-7)

  These three built and checked in by Vladimir Volovich:
1) sparc-solaris
OS: Sun Solaris 8
compiler: gcc (GCC) 3.4.2
bison (GNU Bison) 1.875d
flex version 2.5.4
GNU m4 1.4.2
GNU Make 3.80

2) sparc-linux
OS: Debian GNU/Linux 3.1 (Sarge), kernel 2.4.27-2-sparc64
gcc (GCC) 3.3.5 (Debian 1:3.3.5-13)
bison (GNU Bison) 1.875d
flex 2.5.31
GNU m4 1.4.2
GNU Make 3.80

3) powerpc-aix
OS: AIX 4.3
compiler: IBM C for AIX Compiler, Version 5 (xlc)
bison (GNU Bison) 1.34
flex version 2.5.4
GNU m4 1.4
GNU Make 3.79.1


xdvi 22.84.10 - ok 28nov06
  http://xdvi.sourceforge.net/


- TeX Live includes many programs, which depend on many libraries, notably
  the TeX file-searching library kpathsea.
 
- TL has thousands of users, and they almost all install binaries,
  rather than compile from source.

- Of course kpathsea is itself part of TeX Live, and we need to use the
  version that is included here, not whatever is randomly installed on
  the build system or the end-user's system.

- So a program that TL includes, such as lcdf-typetools
  (http://www.lcdf.org/type/), has a configure option
  --enable-tetex-build, which sets up CPPFLAGS and LDFLAGS to use the
  local kpathsea in the build tree, like this:

if test "x$enable_tetex_build" = xyes; then
...
 CPPFLAGS="$CPPFLAGS -I\$(top_builddir)/../../texk -I\$(top_srcdir)/../../texk"
 LDFLAGS="$LDFLAGS -L\$(top_builddir)/../../texk/kpathsea/.libs"


- The exact paths there aren't important reflect the structure
  of our source hierarchy, relative to top_builddir/srcddir.

- The quoting there makes the values in the Makefile use Make variables:
CPPFLAGS =  -I$(top_builddir)/../../texk -I$(top_srcdir)/../../texk

- However, since "$(top_builddir)" is used as a literal string, of
  course that's not going to be found in the -I list, so any further
  configure tests that need those values are going to fail.  For example:
AC_CHECK_DECLS(kpse_opentype_format, :, :, [#include <kpathsea/kpathsea.h>])

- To get around this, we've simply been hardwiring the test results of
  when --enable-tetex-build is given.  So the test above becomes:
    if test "x$enable_tetex_build" = xyes; then
      AC_DEFINE(HAVE_DECL_KPSE_OPENTYPE_FORMAT)
    else
      AC_CHECK_DECLS(kpse_opentype_format, :, :, [#include <kpathsea/kpathsea.h>])
    fi

- None of this is actually specific to kpathsea, there are tons of other
  libraries involved.  It's just easier to discuss a specific example.

So I asked autoconf@gnu.org:
I am wondering if there's a reasonable way to use the top_builddir and
top_srcdir values at configure time.  As in:
CPPFLAGS="$CPPFLAGS -I$top_builddir/whatever"

When simply used as above, the value is not defined.  It seems that the
value for these variables only gets defined at the end, for output (or
for recursive --help's).

I guess I could simply duplicate the code which computes them, but of
course that is not very appealing.  Is there a better way?


Andreas Schwab replied:
At configure time $top_builddir == "." and $top_srcdir == $srcdir.  They
are only different in sub-makefiles.

So maybe it would not be so hard.  Bob Frisenhahn mentioned:
# Get full paths to source and build directories
srcdirfull=`cd $srcdir && pwd`
builddir=`pwd`