Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
udns-lua/auto.def
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
56 lines (45 sloc)
1.06 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Initial auto.def created by 'autosetup --init' | |
| use cc cc-shared | |
| # Add any user options here | |
| options { | |
| with-lua: => "Search for Lua in directory DIR" | |
| } | |
| cc-check-includes udns.h | |
| # TODO pull lua search into a module | |
| # TODO allow "use lua" "use lua5.1" etc. to specify supported lua version, if not both | |
| # TODO print version of lua found | |
| # Lua header search strategy | |
| # Implicit: | |
| # 1. System default search | |
| # 2. /usr/local/include+{,lua5.1,lua5.2} | |
| # 3. /usr/include+{,lua5.1,lua5.2} | |
| # Explicit: | |
| # 1. PATH+{,lua5.1,lua5.2} | |
| set WITHLUA [opt-val with-lua] | |
| proc check-lua-dir {dir} { | |
| foreach sub { "" /lua5.1 /lua5.2 } { | |
| if {[cc-check-includes $dir$sub/lua.h]} { | |
| define LUA_INCLUDE_PATH $dir$sub | |
| return 1 | |
| } | |
| } | |
| } | |
| proc check-lua-dirs {dirs} { | |
| foreach dir $dirs { | |
| if {[check-lua-dir $dir]} { | |
| return 1 | |
| } | |
| } | |
| } | |
| if { $WITHLUA == "" } { | |
| # Implicit | |
| if {[cc-check-includes lua.h]} { | |
| } else { | |
| check-lua-dirs { /usr/local/include /usr/include } | |
| } | |
| } else { | |
| # Explicit | |
| check-lua-dir $WITHLUA | |
| } | |
| make-config-header config.h | |
| make-template Makefile.in | |