Imported from ../lua-5.0.3.tar.gz.
[lua.git] / config
blob34c77ea3722175b346db4831164810ea6e85ebdd
1 # configuration file for making Lua 5.0
2 # see INSTALL for installation instructions
4 # These are default values. Skip this section and see the explanations below.
6 LOADLIB=
7 DLLIB=
8 NUMBER=
9 POPEN=
10 TMPNAM=
11 DEGREES=
12 USERCONF=
14 # == CHANGE THE SETTINGS BELOW TO SUIT YOUR ENVIRONMENT =======================
16 # --------------------------------------------------------------- Lua libraries
18 # Support for dynamically loading C libraries for Lua is a very important
19 # feature, which we strongly recommend be enabled. By default, this support is
20 # enabled on Windows systems (see below) but disabled on other systems because
21 # it relies on system-dependent code that is not part of ANSI C. For more
22 # information on dynamic loading, read the comments in src/lib/liolib.c .
24 # To enable support for dynamic loading on Unix systems that support the dlfcn
25 # interface (e.g., Linux, Solaris, IRIX, BSD, AIX, HPUX, and probably others),
26 # uncomment the next two lines.
28 #LOADLIB= -DUSE_DLOPEN=1
29 #DLLIB= -ldl
31 # In Linux with gcc, you should also uncomment the next definition for
32 # MYLDFLAGS, which passes -E (= -export-dynamic) to the linker. This option
33 # allows dynamic libraries to link back to the `lua' program, so that they do
34 # not need the Lua libraries. (Other systems may have an equivalent facility.)
36 #MYLDFLAGS= -Wl,-E
38 # On Windows systems. support for dynamic loading is enabled by default.
39 # To disable this support, uncomment the next line.
41 #LOADLIB= -DUSE_DLL=0
43 # The Lua IO library (src/lib/liolib.c) has support for pipes using popen and
44 # pclose. This support is enabled by default on POSIX systems.
45 # If your system is not POSIX but has popen and pclose, define USE_POPEN=1.
46 # If you don't want to support pipes, define USE_POPEN=0.
48 #POPEN= -DUSE_POPEN=1
49 #POPEN= -DUSE_POPEN=0
51 # The form below will probably work in (some) Windows systems.
53 #POPEN= -DUSE_POPEN=1 -Dpopen=_popen -Dpclose=_pclose
55 # The Lua OS library (src/lib/liolib.c) exports an interface to the C function
56 # tmpnam, which gcc now thinks is `dangerous'. So, support for tmpnam is
57 # disabled by default when compiling with gcc.
58 # If you still want to use tmpnam, define USE_TMPNAME=1. If you don't want to
59 # use tmpnam even if you're not compiling with gcc, define USE_TMPNAME=0.
61 #TMPNAM= -DUSE_TMPNAME=1
62 #TMPNAM= -DUSE_TMPNAME=0
64 # The Lua math library (src/lib/lmathlib.c) now operates in radians, unlike
65 # previous versions of Lua, which used degrees. To use degrees instead of
66 # radians, define USE_DEGREES.
68 #DEGREES= -DUSE_DEGREES
70 # ------------------------------------------------------------------ Lua core
72 # Lua uses double for numbers. To change this, uncomment and edit the following
73 # line, changing USE_XXX to one of USE_DOUBLE, USE_FLOAT, USE_LONG, USE_INT.
75 #NUMBER= -DLUA_USER_H='"../etc/luser_number.h"' -DUSE_XXX
77 # When compiling Lua with gcc on a Pentium machine, using a fast rounding
78 # method for the conversion of doubles to ints can give around 20% speed
79 # improvement. To use this rounding method, uncomment the following line.
80 #NUMBER= -DLUA_USER_H='"../etc/luser_number.h"' -DUSE_FASTROUND
82 # For partial compatibility with old upvalue syntax, define LUA_COMPATUPSYNTAX.
83 # For partial compatibility with old upvalue behavior in C functions, define
84 # LUA_COMPATUPVALUES. Add these definitions to MYCFLAGS.
86 # -DLUA_COMPATUPSYNTAX -DLUA_COMPATUPVALUES
88 # ------------------------------------------------------------- Lua interpreter
90 # The stand-alone Lua interpreter needs the math functions, which are usually
91 # in libm.a (-lm).  If your C library already includes the math functions,
92 # or if you are using a modified interpreter that does not need them,
93 # then comment the following line or add the appropriates libraries.
95 EXTRA_LIBS= -lm
97 # If you want to customize the stand-alone Lua interpreter, uncomment and
98 # edit the following two lines; also edit etc/saconfig.c to suit your needs.
99 # -DUSE_READLINE adds line editing and history to the interpreter. You need
100 # to add -lreadline (and perhaps also -lhistory and -lcurses or -lncurses)
101 # to EXTRA_LIBS.
103 #USERCONF=-DLUA_USERCONFIG='"$(LUA)/etc/saconfig.c"' -DUSE_READLINE
104 #EXTRA_LIBS= -lm -ldl -lreadline # -lhistory -lcurses -lncurses
106 # ------------------------------------------------------------------ C compiler
108 # You need an ANSI C compiler. gcc is a popular one. We do not use -ansi in
109 # WARN because it disables POSIX features used in the libraries.
111 CC= gcc
112 WARN= -Wall
114 # ------------------------------------------------------------------ C options
116 # Write here any options you may need for your C compiler.
117 # If you are using gcc, -O3 will get you a faster but larger code. You can
118 # also add -fomit-frame-pointer to get even faster code at the cost of losing
119 # debug information. If you only want the shared libraries, you may want to
120 # add -fPIC to MYCFLAGS.
122 MYCFLAGS= -O2
123 #MYCFLAGS= -O3 -fomit-frame-pointer # -fPIC
125 # Write here any options you may need for your C linker.
126 #MYLDFLAGS=
128 # ------------------------------------------------------------------ librarian
130 # This should work in all Unix systems.
132 AR= ar rcu
134 # If your system doesn't have (or need) ranlib, use RANLIB=true.
135 # On some systems, "ar s" does what ranlib would do.
137 RANLIB= ranlib
138 #RANLIB= ar s
139 #RANLIB= true
141 # ------------------------------------------------------------------ stripper
143 # This should work in all Unix systems, but you may want to add options.
145 STRIP= strip
147 # ------------------------------------------------------------------ install
149 # Locations for "make install". You may need to be root do "make install".
151 INSTALL_ROOT= /usr/local
152 INSTALL_BIN= $(INSTALL_ROOT)/bin
153 INSTALL_INC= $(INSTALL_ROOT)/include
154 INSTALL_LIB= $(INSTALL_ROOT)/lib
155 INSTALL_MAN= $(INSTALL_ROOT)/man/man1
157 # You may prefer to use "install" instead of "cp" if you have it.
158 # If you use "install", you may also want to change the permissions after -m.
160 INSTALL_EXEC= cp
161 INSTALL_DATA= cp
162 #INSTALL_EXEC= install -m 0755
163 #INSTALL_DATA= install -m 0644
165 # == END OF USER SETTINGS. NO NEED TO CHANGE ANYTHING BELOW THIS LINE =========
167 V=5.0
169 BIN= $(LUA)/bin
170 INC= $(LUA)/include
171 LIB= $(LUA)/lib
173 INCS= -I$(INC) $(EXTRA_INCS)
174 DEFS= $(NUMBER) $(EXTRA_DEFS)
176 CFLAGS= $(MYCFLAGS) $(WARN) $(INCS) $(DEFS)
178 # (end of config)