File: plplot_examples.lua.in

package info (click to toggle)
plplot 5.15.0%2Bdfsg-19
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 31,312 kB
  • sloc: ansic: 79,707; xml: 28,583; cpp: 20,033; ada: 19,456; tcl: 12,081; f90: 11,431; ml: 7,276; java: 6,863; python: 6,792; sh: 3,274; perl: 828; lisp: 75; makefile: 50; sed: 34; fortran: 5
file content (23 lines) | stat: -rw-r--r-- 1,164 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
-- initialise Lua bindings for PLplot examples.
--[[
The Lua 5.0 stanza below was temporarily tested for Lua 5.2 by
changing "Lua 5.0" to Lua 5.2 and converting all loadlib calls to
package.loadlib.  That test was a success (as was a test for the
non-Lua-5.0 stanza below when these temporary changes were removed)
when WRITEABLE_TARGET was non-null (which occurs when the user
uses the -DUSE_WRITEABLE_TARGET_TEST_PREFIX=ON option).  So
likely a real Lua 5.0 environment will work, but that has not
been explicitly tested.
--]]
if string.sub(_VERSION,1,7)=='Lua 5.0' then
	lib=
	          loadlib('@lua_lib_location@/@WRITEABLE_TARGET@plplotluac.so','luaopen_@WRITEABLE_TARGET@plplotluac') or
                  loadlib('@lua_lib_location@/@WRITEABLE_TARGET@plplotluac.dll','luaopen_@WRITEABLE_TARGET@plplotluac') or
                  loadlib('@lua_lib_location@/@WRITEABLE_TARGET@plplotluac.dylib','luaopen_@WRITEABLE_TARGET@plplotluac')
	assert(lib)()
else
	package.cpath = '@lua_lib_location@/?.so;' ..
                  '@lua_lib_location@/?.dll;' ..
                  '@lua_lib_location@/?.dylib;' ..package.cpath
	require('@WRITEABLE_TARGET@plplotluac')
end