[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-smalltalk] example of how to disable packages in configure.ac
From: |
Paolo Bonzini |
Subject: |
[Help-smalltalk] example of how to disable packages in configure.ac |
Date: |
Fri, 17 Nov 2006 11:56:48 +0100 |
User-agent: |
Thunderbird 1.5.0.8 (Macintosh/20061025) |
This is an example of how to test for a library or function in
configure.ac, and disable a package if it is absent.
It may help people making complete patches for bindings.
Paolo
* local directory is at address@hidden/smalltalk--devo--2.2--patch-179
* comparing to address@hidden/smalltalk--devo--2.2--patch-179
M ./configure.ac
M ./packages.xml.in
* modified files
--- orig/configure.ac
+++ mod/configure.ac
@@ -210,6 +210,7 @@ dnl ------------------------- OTHER LIBR
AM_LANGINFO_CODESET
AM_ICONV
+AC_CHECK_LIB(ncurses, initscr)
GST_HAVE_GMP
GST_HAVE_TCLTK
GST_HAVE_READLINE
@@ -221,6 +222,7 @@ MODULES_GTK=""
MODULES_TCP=""
MODULES_I18N=""
BLOX_IMPLEMENTATION=BloxTK
+NCURSES_DISABLED="disabled-"
I18N_DISABLED="disabled-"
GTK_DISABLED="disabled-"
@@ -232,6 +234,7 @@ AC_SUBST(MODULES_TK)
AC_SUBST(BLOX_IMPLEMENTATION)
AC_SUBST(GTK_DISABLED)
AC_SUBST(I18N_DISABLED)
+AC_SUBST(NCURSES_DISABLED)
AC_CHECK_HEADER(gdbm.h, MODULES_EXAMPLE="$MODULES_EXAMPLE gdbm.la")
@@ -257,6 +260,7 @@ test "$enable_gtk" != no && MODULES_GTK=
test "$enable_gtk" = blox && BLOX_IMPLEMENTATION=BloxGTK
test "$gst_cv_tcltk_libs" != "not found" && MODULES_TK="blox-tk.la"
test "$gst_cv_inet_sockets" != "no" && MODULES_TCP="tcp.la"
+test "$ac_cv_lib_ncurses_initscr" = yes && NCURSES_DISABLED=""
test "$ac_cv_func_nl_langinfo" = yes && \
test "$am_cv_func_iconv" = yes && MODULES_I18N="i18n.la" I18N_DISABLED=""
--- orig/packages.xml.in
+++ mod/packages.xml.in
@@ -277,6 +277,15 @@
<file>gdbm-c.st</file>
</package>
+<@address@hidden>
+ <name>NCurses</name>
+ <filein>ncurses.st</filein>
+ <library>libncurses</library>
+ <directory>examples</directory>
+
+ <file>ncurses.st</file>
+</package>
+
<package>
<name>MD5</name>
<filein>md5.st</filein>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Help-smalltalk] example of how to disable packages in configure.ac,
Paolo Bonzini <=