2
0

100-no_readline.patch 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. --- a/src/luaconf.h
  2. +++ b/src/luaconf.h
  3. @@ -38,7 +38,6 @@
  4. #if defined(LUA_USE_LINUX)
  5. #define LUA_USE_POSIX
  6. #define LUA_USE_DLOPEN /* needs an extra library: -ldl */
  7. -#define LUA_USE_READLINE /* needs some extra libraries */
  8. #endif
  9. #if defined(LUA_USE_MACOSX)
  10. --- a/src/Makefile
  11. +++ b/src/Makefile
  12. @@ -17,6 +17,7 @@ LIBS= -lm $(MYLIBS)
  13. MYCFLAGS=
  14. MYLDFLAGS=
  15. MYLIBS=
  16. +# USE_READLINE=1
  17. # == END OF USER SETTINGS. NO NEED TO CHANGE ANYTHING BELOW THIS LINE =========
  18. @@ -86,7 +87,7 @@ echo:
  19. @echo "MYLIBS = $(MYLIBS)"
  20. # convenience targets for popular platforms
  21. -
  22. +RFLAG=$(if $(USE_READLINE),-DLUA_USE_READLINE)
  23. none:
  24. @echo "Please choose a platform:"
  25. @echo " $(PLATS)"
  26. @@ -101,16 +102,16 @@ bsd:
  27. $(MAKE) all MYCFLAGS="-DLUA_USE_POSIX -DLUA_USE_DLOPEN" MYLIBS="-Wl,-E"
  28. freebsd:
  29. - $(MAKE) all MYCFLAGS="-DLUA_USE_LINUX" MYLIBS="-Wl,-E -lreadline"
  30. + $(MAKE) all MYCFLAGS="-DLUA_USE_LINUX $(RFLAG)" MYLIBS="-Wl,-E$(if $(USE_READLINE), -lreadline)"
  31. generic:
  32. $(MAKE) all MYCFLAGS=
  33. linux:
  34. - $(MAKE) all MYCFLAGS+=-DLUA_USE_LINUX MYLIBS="-Wl,-E -ldl -lreadline -lhistory -lncurses"
  35. + $(MAKE) all MYCFLAGS+="-DLUA_USE_LINUX $(RFLAG)" MYLIBS="-Wl,-E -ldl $(if $(USE_READLINE), -lreadline -lhistory -lncurses)"
  36. macosx:
  37. - $(MAKE) all MYCFLAGS=-DLUA_USE_LINUX MYLIBS="-lreadline"
  38. + $(MAKE) all MYCFLAGS=-DLUA_USE_LINUX $(if $(USE_READLINE), MYLIBS="-lreadline")
  39. # use this on Mac OS X 10.3-
  40. # $(MAKE) all MYCFLAGS=-DLUA_USE_MACOSX