Ticket #2173: lua-5.0.3-config-1.patch

File lua-5.0.3-config-1.patch, 3.8 KB (added by Luca, 18 years ago)

Enables use of readline and ncurses, fixes layout to use /usr, makes use of mkstemp instead of tmpnam, enabled dynamic loading, enables fast rounding conversion method, enables use of popen and pclose and fixes make install to use install instead of cp

  • lua-5.0.3/config

    Submitted By: Luca Piol <liliana.perossa at fastwebnet dot it>
    Date: 2006-10-04
    Initial Package Version: 5.0.3
    Upstream Status: Not submitted
    Origin: self
    Description: Fixes config file to use blfs layout, enables dynamic
    loading, allows dynamic libraries to link back to lua program, enable
    popen and pclose, uses mkstemp instead of tmpname, enables fast rounding
    method for conversion from doubles to ints, enables support for readline
    and ncurses, fixes INSTALL_ROOT to /usr and fixes make install process to use install insted of cp.
    
    diff -Naur lua-5.0.3/config lua-5.0.3/config
     
    2525# interface (e.g., Linux, Solaris, IRIX, BSD, AIX, HPUX, and probably others),
    2626# uncomment the next two lines.
    2727#
    28 #LOADLIB= -DUSE_DLOPEN=1
    29 #DLLIB= -ldl
     28LOADLIB= -DUSE_DLOPEN=1
     29DLLIB= -ldl
    3030#
    3131# In Linux with gcc, you should also uncomment the next definition for
    3232# MYLDFLAGS, which passes -E (= -export-dynamic) to the linker. This option
    3333# allows dynamic libraries to link back to the `lua' program, so that they do
    3434# not need the Lua libraries. (Other systems may have an equivalent facility.)
    3535#
    36 #MYLDFLAGS= -Wl,-E
     36MYLDFLAGS= -Wl,-E
    3737#
    3838# On Windows systems. support for dynamic loading is enabled by default.
    3939# To disable this support, uncomment the next line.
     
    4545# If your system is not POSIX but has popen and pclose, define USE_POPEN=1.
    4646# If you don't want to support pipes, define USE_POPEN=0.
    4747#
    48 #POPEN= -DUSE_POPEN=1
     48POPEN= -DUSE_POPEN=1
    4949#POPEN= -DUSE_POPEN=0
    5050#
    5151# The form below will probably work in (some) Windows systems.
     
    6060#
    6161#TMPNAM= -DUSE_TMPNAME=1
    6262#TMPNAM= -DUSE_TMPNAME=0
     63TMPNAM= -DUSE_MKSTEMP=1
    6364
    6465# The Lua math library (src/lib/lmathlib.c) now operates in radians, unlike
    6566# previous versions of Lua, which used degrees. To use degrees instead of
     
    7778# When compiling Lua with gcc on a Pentium machine, using a fast rounding
    7879# method for the conversion of doubles to ints can give around 20% speed
    7980# improvement. To use this rounding method, uncomment the following line.
    80 #NUMBER= -DLUA_USER_H='"../etc/luser_number.h"' -DUSE_FASTROUND
     81NUMBER= -DLUA_USER_H='"../etc/luser_number.h"' -DUSE_FASTROUND
    8182
    8283# For partial compatibility with old upvalue syntax, define LUA_COMPATUPSYNTAX.
    8384# For partial compatibility with old upvalue behavior in C functions, define
     
    100101# to add -lreadline (and perhaps also -lhistory and -lcurses or -lncurses)
    101102# to EXTRA_LIBS.
    102103#
    103 #USERCONF=-DLUA_USERCONFIG='"$(LUA)/etc/saconfig.c"' -DUSE_READLINE
    104 #EXTRA_LIBS= -lm -ldl -lreadline # -lhistory -lcurses -lncurses
     104USERCONF=-DLUA_USERCONFIG='"$(LUA)/etc/saconfig.c"' -DUSE_READLINE
     105EXTRA_LIBS= -lm -ldl -lreadline -lhistory -lcurses -lncurses
    105106
    106107# ------------------------------------------------------------------ C compiler
    107108
     
    119120# debug information. If you only want the shared libraries, you may want to
    120121# add -fPIC to MYCFLAGS.
    121122#
    122 MYCFLAGS= -O2
     123MYCFLAGS= -O2 -fomit-frame-pointer -fPIC
    123124#MYCFLAGS= -O3 -fomit-frame-pointer # -fPIC
    124125
    125126# Write here any options you may need for your C linker.
     
    148149
    149150# Locations for "make install". You may need to be root do "make install".
    150151#
    151 INSTALL_ROOT= /usr/local
     152INSTALL_ROOT= /usr
    152153INSTALL_BIN= $(INSTALL_ROOT)/bin
    153154INSTALL_INC= $(INSTALL_ROOT)/include
    154155INSTALL_LIB= $(INSTALL_ROOT)/lib
     
    157158# You may prefer to use "install" instead of "cp" if you have it.
    158159# If you use "install", you may also want to change the permissions after -m.
    159160#
    160 INSTALL_EXEC= cp
    161 INSTALL_DATA= cp
    162 #INSTALL_EXEC= install -m 0755
    163 #INSTALL_DATA= install -m 0644
     161#INSTALL_EXEC= cp
     162#INSTALL_DATA= cp
     163INSTALL_EXEC= install -m 0755
     164INSTALL_DATA= install -m 0644
    164165
    165166# == END OF USER SETTINGS. NO NEED TO CHANGE ANYTHING BELOW THIS LINE =========
    166167