Permalink
Browse files

Better handling of osconf (config.mak, etc.)

  • Loading branch information...
ec429
ec429 committed Jul 10, 2012
1 parent f4e96b4 commit 8f02e016a5a023dd8f4688b21e648fb865b4852b
Showing with 22 additions and 3 deletions.
  1. +1 −0 .gitignore
  2. +4 −2 Makefile
  3. +7 −0 README
  4. +3 −1 osconf.h
  5. +7 −0 readme.htm
View
@@ -8,3 +8,4 @@ genconfig
genkeymap
version.h
quirc.1
+config.mak
View
@@ -6,11 +6,13 @@ CFLAGS := -Wall -Wextra -Werror -pedantic -std=gnu99 -D_GNU_SOURCE $(OPTFLAGS)
AWK := gawk
VERSION := `git describe --tags`
PREFIX := /usr/local
-# -lanl is for ASYNCH_NL
-OPTLIBS := -lanl
+LIBS_ASYNCH_NL := -lanl
+OPTLIBS = $(LIBS_ASYNCH_NL)
LIBS := -lncurses ttyraw.o ttyesc.o irc.o bits.o strbuf.o colour.o buffer.o names.o config.o input.o logging.o types.o $(OPTLIBS)
INCLUDE := ttyraw.h ttyesc.h irc.h bits.h strbuf.h colour.h buffer.h names.h config.h input.h logging.h types.h quirc.h version.h osconf.h
+-include config.mak
+
all: quirc doc
install: all doc
View
7 README
@@ -338,3 +338,10 @@ turns yellow.
This probably means your terminal isn't sending VT100 (ANSI) escape
sequences, but rather some other set of sequences. See the section
"Keymapping", above.
+ I can't build it! My libc doesn't support getaddrinfo_a()!
+ You need to disable ASYNCH_NL; add the following lines to config.mak
+ (which you should create if not present):
+ OPTFLAGS := $(OPTFLAGS) -DASYNCH_NL=0
+ LIBS_ASYNCH_NL :=
+ This should disable asynchronous name lookups, instead using code which
+ will block while performing the DNS lookup.
View
@@ -8,4 +8,6 @@
osconf.h: platform-specific configuration settings
*/
-#define ASYNCH_NL 1 // set to 0 if platform does not provide getaddrinfo_a() (and remove -lanl from Makefile OPTLIBS)
+#ifndef ASYNCH_NL
+ #define ASYNCH_NL 1 // set to 0 if platform does not provide getaddrinfo_a() (and remove -lanl from Makefile OPTLIBS)
+#endif /* ¬ASYNCH_NL */
View
@@ -299,6 +299,13 @@ <h2>Troubleshooting</h2>
<dd><p>One possible cause of this is that your terminal size is not what quIRC thinks it is. You may need to /set height and width, or export the environment variables $LINES and $COLUMNS from your shell (typically you would also add this to your shell's .rc file), or as a last resort resize your terminal to 80x24.</p><p>Another possibility is that your terminal emulator isn't recognising terminal escape sequences (which quIRC uses heavily for eg. cursor positioning). For details see your terminal emulator's documentation; it is known that xterm works out-of-the-box. In general quIRC relies on your system&apos;s <strong>terminfo</strong> database; if this is inaccurate, or your <small>$TERM</small> is set incorrectly, quIRC will be sending the wrong escape sequences.</p></dd>
<dt>The control keys/cursor keys/function keys don't do anything!</dt>
<dd><p>This probably means your terminal isn't sending VT100 (ANSI) escape sequences, but rather some other set of sequences. See the section &quot;<a href="#keymapping">Keymapping</a>&quot;, above.</p></dd>
+<dt>I can't build it! My libc doesn't support getaddrinfo_a()!</dt>
+<dd><p>You need to disable ASYNCH_NL; add the following lines to <small>config.mak</small> (which you should create if not present):</p>
+<blockquote style="font-family:monospace;">
+OPTFLAGS := $(OPTFLAGS) -DASYNCH_NL=0<br />
+LIBS_ASYNCH_NL :=
+</blockquote>
+<p>This should disable asynchronous name lookups, instead using code which will block while performing the DNS lookup.</p></dd>
</dl>
</div><!--#trouble-->
</body>

0 comments on commit 8f02e01

Please sign in to comment.