Skip to content

Instantly share code, notes, and snippets.

@kergoth
Created March 20, 2010 01:06
Show Gist options
  • Save kergoth/338382 to your computer and use it in GitHub Desktop.
Save kergoth/338382 to your computer and use it in GitHub Desktop.
Experimentations with BBVERSIONS
---
Makefile.am | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
--- nano-1.0.9.orig/Makefile.am
+++ nano-1.0.9/Makefile.am
@@ -1,9 +1,6 @@
## $Id: Makefile.am,v 1.7.2.4 2002/03/26 17:56:34 astyanax Exp $
AUTOMAKE_OPTIONS = gnu no-dependencies
-M4DIR = $(srcdir)/m4
-ACLOCAL_AMFLAGS = -I $(M4DIR)
-ACINCLUDE_INPUTS = $(M4DIR)/gettext.m4 $(M4DIR)/largefile.m4 \
- $(M4DIR)/lcmessage.m4 $(M4DIR)/progtest.m4
+ACLOCAL_AMFLAGS = -I m4
bin_PROGRAMS = nano
nano_SOURCES = cut.c \
@@ -31,6 +28,3 @@ SUBDIRS = po intl
localedir = $(datadir)/locale
INCLUDES = -Iintl -DLOCALEDIR=\"$(localedir)\"
-
-$(srcdir)/acinclude.m4: $(ACINCLUDE_INPUTS)
- cat $(ACINCLUDE_INPUTS) > $@
SRC_URI_1.0.0[md5sum] = "34a31da9c9eb222d13494a17c2d5004a"
SRC_URI_1.0.0[sha256sum] = "cad0d0aa7c159d78a1c7b1b713d47a8e584282469fa6130c67261b4d3b69eec6"
SRC_URI_1.0.1[md5sum] = "0bd21e512c8cb8ad8a21c0990bf195a4"
SRC_URI_1.0.1[sha256sum] = "4b43c04e24417930bcc050bd64c66e7fce259acde4ba5089b0f5c18995f7a394"
SRC_URI_1.0.2[md5sum] = "5535dcaf7f412d6fe0b9f4505f3ff4e9"
SRC_URI_1.0.2[sha256sum] = "2f0d7c4f3240dbac73e0a0785048981bba29174a94589fe7703d2c5055fc5955"
SRC_URI_1.0.3[md5sum] = "520a7d3330485cd747d0ebfd48a3fd57"
SRC_URI_1.0.3[sha256sum] = "9a3f62f0e60c2c70bd872389b808a949c99208b49ba11f7d027449d127554ee4"
SRC_URI_1.0.4[md5sum] = "e48f0c030f30ef279cb37c7e046a9b14"
SRC_URI_1.0.4[sha256sum] = "df6bf9d0c9df1b2b9c567fc3b747550f610b80c49557798918fa559c7aabf9a3"
SRC_URI_1.0.5[md5sum] = "6673330d15c1d08d826215e8fefe443a"
SRC_URI_1.0.5[sha256sum] = "a992bc38b3986a6af49d0e98377495d138af8c295351ca653a09da4578baa4e7"
SRC_URI_1.0.6[md5sum] = "01db121b6f4645480af29d3926a4b662"
SRC_URI_1.0.6[sha256sum] = "4ca4eeb2e0a7123a87b394d0e64a7a30cdbd6d5eb3a13498b8a014b240db1e73"
SRC_URI_1.0.7[md5sum] = "dce4cb0721f6d5533a4bf6b471664d20"
SRC_URI_1.0.7[sha256sum] = "2a9cefdc2fb02a389819be3c6883162e05ee603542231a75dbe189b6c17460a1"
SRC_URI_1.0.8[md5sum] = "84743b50f839013b6bba654c7ae707bc"
SRC_URI_1.0.8[sha256sum] = "f961ba167df1e905d9eeb0bbd0a3742d270553e7162fbf28bfc8d1fee374acbc"
SRC_URI_1.0.9[md5sum] = "499162ef77d0c5b9c2c171bae6052327"
SRC_URI_1.0.9[sha256sum] = "e4cd864e44b1efe24f0260fd491fabeed190bdb04e0713ae6298d220cdf034fb"
SRC_URI_1.1.0[md5sum] = "067bebb2b9776562a296822352c02a2b"
SRC_URI_1.1.0[sha256sum] = "782b11e8e867abd49fda5d0284b69e3b28d7645bdcd44c5707bcc82ced4701cb"
SRC_URI_1.1.10[md5sum] = "84c398bb26f81908116e54928b07b4e8"
SRC_URI_1.1.10[sha256sum] = "255ed116c9c8b88021f9d351e2967f95fa7371bb93bde596a523c92f080ad15d"
SRC_URI_1.1.11[md5sum] = "fd20e5b0245d7d1274d61f04f97bac76"
SRC_URI_1.1.11[sha256sum] = "4821f4997ce4a927d38c77ec1a4b62a601d007e0a8eeb7b7fc1893b4b0f558a8"
SRC_URI_1.1.12[md5sum] = "f1ca6735d39dbb8896f462e365251203"
SRC_URI_1.1.12[sha256sum] = "066887fe561de287e71e750c9b87551c005906340b4bf9f97ae9b42147b46c78"
SRC_URI_1.1.1[md5sum] = "1368f83394a6b3e85868e802230a498b"
SRC_URI_1.1.1[sha256sum] = "61bd8b87ec3e14ba7a6abcc3f86578efa71b0a1355f1b169f55c72cb97eebb11"
SRC_URI_1.1.2[md5sum] = "516401821c7eefb269115b615a432d2d"
SRC_URI_1.1.2[sha256sum] = "8c4ec2900fb7ae8b1e6a6a3d907049bbfa6b4d0b7081a5f2e5661a12b720b6ef"
SRC_URI_1.1.3[md5sum] = "2f09f2f59813bf4d5f9a69e44fe64935"
SRC_URI_1.1.3[sha256sum] = "14829b2a9dc6f9e00cb774eedf0f89fb95aad0031c23f58ac5862ec0bd426c3f"
SRC_URI_1.1.4[md5sum] = "e6417de9a3f499d81cf4ef86aac96c14"
SRC_URI_1.1.4[sha256sum] = "5c0ddf8379cdf9781347f2c765a9567acbb956dc337a74979a44af590c76c140"
SRC_URI_1.1.5[md5sum] = "7087cc788ee6b16391caeea38389c5f4"
SRC_URI_1.1.5[sha256sum] = "5952ee1e784134b3353cecc650f96b852b0226989068df248b924fc2953f1f37"
SRC_URI_1.1.6[md5sum] = "7e7ce0d60720fa7ee2160fd8bc595be8"
SRC_URI_1.1.6[sha256sum] = "69acbfa985614cd80836e1ddd701eaaa15ebe121da2640d21cd17516ca179aed"
SRC_URI_1.1.7[md5sum] = "abc9e959bf6b31e8cf758db42f95fadb"
SRC_URI_1.1.7[sha256sum] = "74c7e1aa47c7379b78b53e7f0bde225fb3aee3a4f7d4d71db9f604653f12b363"
SRC_URI_1.1.8[md5sum] = "87708a6075caea7e720f9cc8ff76a497"
SRC_URI_1.1.8[sha256sum] = "7f090e17b3fc1b437821b9dd6ac4499ffaa0206c5a4ff74b73991ef22adc8eb6"
SRC_URI_1.1.9[md5sum] = "e78f1baa06eda2b323c2c792f9f63641"
SRC_URI_1.1.9[sha256sum] = "aa6b93a1a192f938877ec3300a877cd59e6e138df70ac0f6acd08bd473f4edf6"
SRC_URI_1.2.0[md5sum] = "48a045da0ac8851df23f00122d3646b8"
SRC_URI_1.2.0[sha256sum] = "c3c5d0781322cb7429a2e2670ae03571214b7413d27fd991fb162263982062d1"
SRC_URI_1.2.1[md5sum] = "188d24b9cc4c1041ac58d6b6f7941eb4"
SRC_URI_1.2.1[sha256sum] = "f12483dbe029836cad6c58e53077281d9e71a062b1145e57342ea9671296ca40"
SRC_URI_1.2.2[md5sum] = "1c2663caa7d1ca4377a4a2ab61787689"
SRC_URI_1.2.2[sha256sum] = "0f5ebf474282fe87cac9a06c1d529b1e89d028975f79934f7f9fed6a7592440c"
SRC_URI_1.2.3[md5sum] = "fc70be5daee7f712675ac76690f71d50"
SRC_URI_1.2.3[sha256sum] = "c5838e9e860f72d548fddc6f2e8d18e6c665034431dbdf4795dffc815ca16381"
SRC_URI_1.2.4[md5sum] = "2c513310ec5e8b63abaecaf48670ac7a"
SRC_URI_1.2.4[sha256sum] = "a0cfb5e47aa7685eabb0ccb81d28759bdd65cbb21326bb98ee63f80a23d750a0"
SRC_URI_1.2.5[md5sum] = "f2b3efbf1cf356d736740d531b6b22c4"
SRC_URI_1.2.5[sha256sum] = "66b25e3b0df504e2f43bc9711e1c4835ff0826f9d784c323152910b559165346"
SRC_URI_1.3.10[md5sum] = "851609ae03ae967595a888219bad3e2d"
SRC_URI_1.3.10[sha256sum] = "f786b785e2657c1c5dd6555908e236982bdc5fbf6dd7f76f17da6ea5ddf2b5ce"
SRC_URI_1.3.11[md5sum] = "ad6c2270fd674065ef994a58d3a8a7b7"
SRC_URI_1.3.11[sha256sum] = "5f8d718bf5274be6a3a7100ae6693b5001ad15f4b505f0ba670cc28f9b9fc798"
SRC_URI_1.3.12[md5sum] = "1450892aac7ae31d00817d42636d9a0d"
SRC_URI_1.3.12[sha256sum] = "f5537b8a988618fa8524b6a4b0a6950184d37db983b4521ad843b98845da571c"
SRC_URI_1.3.1[md5sum] = "4f47a60a4027f22433b54e092fe61469"
SRC_URI_1.3.1[sha256sum] = "de08a95f9d6dfdda53fd0f8f87f6946a9251d221479f2f90941a2fa8b805d276"
SRC_URI_1.3.2[md5sum] = "86f0cd4dcba4811494151d64b944cbe3"
SRC_URI_1.3.2[sha256sum] = "3769d1938d0b71a42c61ea99e8dfb1742e0cf4d08b1b926798fb2024581ed9b0"
SRC_URI_1.3.3[md5sum] = "aa458049cdede8e60cf3b868bf4c803d"
SRC_URI_1.3.3[sha256sum] = "d73507b918eab70cb27fd7d0f6d7e857247bf11b9fbf8f9e45cc1a9f978b8e1d"
SRC_URI_1.3.4[md5sum] = "c24028eade9f713009a18ab541564409"
SRC_URI_1.3.4[sha256sum] = "87065b41ea4dbfd11eafe38406b78266e2d6a4b7a583769bd72bb687d16baf72"
SRC_URI_1.3.5[md5sum] = "0009f25766b582ef94956faf194876c8"
SRC_URI_1.3.5[sha256sum] = "c42f68421ecfc167788d4312ccb1fc94de67cded974f48289c985411fbb8a6e3"
SRC_URI_1.3.6[md5sum] = "03f951ade0ab1a3de7bd2cfffb2baf51"
SRC_URI_1.3.6[sha256sum] = "c7fe44e94fe3198ca461d67f3674a25dba26c3640dfa789503dd160808b34b13"
SRC_URI_1.3.7[md5sum] = "2d47badfae9f45174cf1ec69b742f961"
SRC_URI_1.3.7[sha256sum] = "d09b35f1ba14365070d779ad5848914441cb73fac5ce2d91ccc1e9b51bb7b63c"
SRC_URI_1.3.8[md5sum] = "88b2ce689f7ad8849b23978c01806b93"
SRC_URI_1.3.8[sha256sum] = "e24bd2f63c31947848897035940012f11233bb01c0fa3a08722d52d9b03f480f"
SRC_URI_1.3.9[md5sum] = "8de48d0de02ed2332a4f7a07563c67af"
SRC_URI_1.3.9[sha256sum] = "7052f6ce989040d9f16c50337c438d030f26e8d2bc90439d25e9c0ae1921eb20"
SRC_URI_2.0.0[md5sum] = "d1a8ac92b1985217f405a4c54562d8f3"
SRC_URI_2.0.0[sha256sum] = "c55a0f8aa7222d47bbfdf9772b5c94e0177c2de28cb9b3f73e69b9fd74a021ae"
SRC_URI_2.0.1[md5sum] = "8abe33be6816ad9acd17391806b42d92"
SRC_URI_2.0.1[sha256sum] = "6af1a2081c6303008163719b9012b403b461fb07991b5603ac28a820494741e2"
SRC_URI_2.0.2[md5sum] = "38046476096530e19a7e805513c64108"
SRC_URI_2.0.2[sha256sum] = "884af214d4b4bf2cb064806070e746eb0f8302e7942324496f5bb93a9a06af90"
SRC_URI_2.0.3[md5sum] = "b8e2c1450b36d21f9a82509da3e4d9b1"
SRC_URI_2.0.3[sha256sum] = "8c29569d0e1eb29cbd3580313b9796c4e6fd0830071ec885021f22be635f5297"
SRC_URI_2.0.4[md5sum] = "8118d8521e121a37d05f5647d2784fa8"
SRC_URI_2.0.4[sha256sum] = "cf6e52b4e061c4cbf848f2247fe0aa76b795e958e621fb96da8b0c5a2c4ac001"
SRC_URI_2.0.5[md5sum] = "8daee919fe29b4fd8213c9e2c021acc6"
SRC_URI_2.0.5[sha256sum] = "05c6ba153dc26febf5366b9d80ee47f412300548c73f0db62eade5fb4fd219d1"
SRC_URI_2.0.6[md5sum] = "619107f0fc3c4383d668cef15aa3ca32"
SRC_URI_2.0.6[sha256sum] = "0d10d8f70a6fadfb9cfaa7b66c5fe7eba17e64ecb96104c4ddedc82f89765d5c"
SRC_URI_2.0.7[md5sum] = "16187fed2bdefec6275ece6401ce4cd2"
SRC_URI_2.0.7[sha256sum] = "5dc783c412c4d1ff463c450d2a2f9e1ea53a43d9ba1dda92bbf5182f60db532f"
SRC_URI_2.0.8[md5sum] = "fcb2a26285921458b6fe381c2802b1a8"
SRC_URI_2.0.8[sha256sum] = "8891830b374fe8ceb8c6bd9ef96ac8479a22bf35bb900877a04f57e24731ee3e"
SRC_URI_2.0.9[md5sum] = "2be94dc43fb60fff4626a2401a977220"
SRC_URI_2.0.9[sha256sum] = "6d212385680d29dcda35dda7801da19c80182a8bc6bc6d5cf7533034c853d37f"
SRC_URI_2.1.0[md5sum] = "ee854d98893c6bd07b903c1b5c963b06"
SRC_URI_2.1.0[sha256sum] = "40cadc26fd42199c7b048590b2f47ad301ef3d2534b050a3a70d79f82dcdc2bb"
SRC_URI_2.1.10[md5sum] = "f55bd9efeccf9da98950b54a4b0d872e"
SRC_URI_2.1.10[sha256sum] = "03af11adace9f6c482a06f5304c5aba5d134972a416ce4368307b604420b2e40"
SRC_URI_2.1.11[md5sum] = "15d8c0717c646de2e946e1eb408feec7"
SRC_URI_2.1.11[sha256sum] = "3da7f1005f225a295be59aa25fa18ef0bb2017b6bc49646a0c6a275d29c1ea25"
SRC_URI_2.1.1[md5sum] = "f95a11f05216ff2a70b7a001241997b2"
SRC_URI_2.1.1[sha256sum] = "658f624809390032026578cd241b13755597376edf63746666e7328c6593b816"
SRC_URI_2.1.2[md5sum] = "b36be3c8cad59fcf9e470eb20be64201"
SRC_URI_2.1.2[sha256sum] = "3dea62570332addccdedc02c724eb73781a0f243b4d52c4704b64370dd6f6fc4"
SRC_URI_2.1.3[md5sum] = "fa98cb4fcdbcf4a81273236750316ee2"
SRC_URI_2.1.3[sha256sum] = "ed49711a389d23adc2d6bbf73afd13b22fa308ed2ce07baad8e17e71f2bb0ac7"
SRC_URI_2.1.4[md5sum] = "5a7df750149507d69694349d4b7d0c79"
SRC_URI_2.1.4[sha256sum] = "ad3f69dbba3ec4929991d32c37d5c03465613fd0fed9b86ac53830c8517e2cbe"
SRC_URI_2.1.5[md5sum] = "4ac9336251e42d51d68ffceba3fa00be"
SRC_URI_2.1.5[sha256sum] = "97244b415e9f4f355f82e527ce7746772b4a963821472d8a432414d10b3b26de"
SRC_URI_2.1.6[md5sum] = "e460a15e5bb7b2eb1a74e4e45b2a7fa8"
SRC_URI_2.1.6[sha256sum] = "8a4e2c6c1bfb4ca1f3b364c75ff26576b0fb514bfb4d66aac6d13b5ec9339647"
SRC_URI_2.1.7[md5sum] = "4eb4fcd015e3c09e3a119250286bc67f"
SRC_URI_2.1.7[sha256sum] = "b1d2cd011af513c072e2a76eeaadbc4200c575bb8113cbeac57d0680e8a6d81f"
SRC_URI_2.1.8[md5sum] = "bd77873a6dd12f8492df08c63ae68040"
SRC_URI_2.1.8[sha256sum] = "ea6d6c42776819a19338f30d2b6a77c76d327287578ca84ba1535e681380a223"
SRC_URI_2.1.9[md5sum] = "41e9ffb4a055eba666cdb17c4e50ba21"
SRC_URI_2.1.9[sha256sum] = "eb49281f0db551311d22cb47087963b870b864046bfc7e7f8b46671bace81e34"
SRC_URI_2.2.0[md5sum] = "b34ea8fac9563b0485f39a065b5893bf"
SRC_URI_2.2.0[sha256sum] = "c1e5e9c2baf2c4cfae6bebd1499ef9c20bfd5e094a966ed3d73a3a9e3f641e2f"
SRC_URI_2.2.1[md5sum] = "12eb7808ab1b8df4d20e87df22c38143"
SRC_URI_2.2.1[sha256sum] = "d831c7c3b35ccd404b58d3244f671ad775a8bdd189bb81512fbfea1b0f6d14f7"
SRC_URI_2.2.2[md5sum] = "e41508c23032f60cd5c9581b8b8a3a76"
SRC_URI_2.2.2[sha256sum] = "f6dbf33a9190153b05d0e665aa088d00fa945188ea1a26c4abd5dd3245e78966"
SRC_URI_2.2.3[md5sum] = "91918a484f54f94fedaebe00dc393a50"
SRC_URI_2.2.3[sha256sum] = "22f20ac3e17d8dcaff54389bdb417a4a0a099843ea7915225e48dedc474af4ee"
nano_cv_func_regexec_segv_emptystr=${nano_cv_func_regexec_segv_emptystr=no}
---
configure.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- nano-1.0.6.orig/configure.in
+++ nano-1.0.6/configure.in
@@ -254,6 +254,6 @@ then
fi
dnl i18n stuff - pretty incomplete for now
-AM_GNU_GETTEXT
+NANO_AM_GNU_GETTEXT
AC_OUTPUT([Makefile intl/Makefile po/Makefile.in])
---
configure.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- nano-1.0.6.orig/configure.in
+++ nano-1.0.6/configure.in
@@ -254,6 +254,6 @@ then
fi
dnl i18n stuff - pretty incomplete for now
-AM_GNU_GETTEXT
+NANO_AM_GNU_GETTEXT
AC_OUTPUT([Makefile intl/Makefile po/Makefile.in])
--- nano-1.2.1.orig/configure.ac
+++ nano-1.2.1/configure.ac
@@ -39,13 +39,17 @@ dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(fcntl.h getopt.h libintl.h limits.h regex.h termio.h termios.h unistd.h)
AC_CHECK_HEADER(regex.h,
- AC_MSG_CHECKING([for broken regexec])
- AC_TRY_RUN([
+ AC_CACHE_CHECK([for broken regexec],
+ [nano_cv_func_regexec_segv_emptystr],
+ AC_TRY_RUN([
#include <sys/types.h>
#include <regex.h>
int main() { regex_t reg; size_t n; regmatch_t r; regcomp(&reg, ".", 0); regexec(&reg, "", n, &r, 0); return 0; }],
- AC_MSG_RESULT(no),
- AC_MSG_RESULT(yes); AC_DEFINE(BROKEN_REGEXEC, 1, [Define this if your regexec() function segfaults when passed an empty string.])
+ [nano_cv_func_regexec_segv_emptystr=no],
+ [nano_cv_func_regexec_segv_emptystr=yes])
+ if test x$nano_cv_func_regexec_segv_emptystr = xyes; then
+ AC_DEFINE(BROKEN_REGEXEC, 1, [Define this if your regexec() function segfaults when passed an empty string.])
+ fi
)
)
---
configure.ac | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
--- nano-1.2.2.orig/configure.ac
+++ nano-1.2.2/configure.ac
@@ -39,13 +39,17 @@ dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(fcntl.h getopt.h libintl.h limits.h regex.h termio.h termios.h unistd.h)
AC_CHECK_HEADER(regex.h,
- AC_MSG_CHECKING([for broken regexec])
- AC_TRY_RUN([
+ AC_CACHE_CHECK([for broken regexec],
+ [nano_cv_func_regexec_segv_emptystr],
+ AC_TRY_RUN([
#include <sys/types.h>
#include <regex.h>
int main () { regex_t reg; size_t n = 1; regmatch_t r; regcomp(&reg, "\\<", 0); regexec(&reg, "", n, &r, 0); regfree(&reg); return 0; }],
- AC_MSG_RESULT(no),
- AC_MSG_RESULT(yes); AC_DEFINE(BROKEN_REGEXEC, 1, [Define this if your regexec() function segfaults when passed an empty string under certain conditions.])
+ [nano_cv_func_regexec_segv_emptystr=no],
+ [nano_cv_func_regexec_segv_emptystr=yes])
+ if test x$nano_cv_func_regexec_segv_emptystr = xyes; then
+ AC_DEFINE(BROKEN_REGEXEC, 1, [Define this if your regexec() function segfaults when passed an empty string under certain conditions.])
+ fi
)
)
--- nano-1.2.2.orig/configure.ac
+++ nano-1.2.2/configure.ac
@@ -39,13 +39,17 @@ dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(fcntl.h getopt.h libintl.h limits.h regex.h termio.h termios.h unistd.h)
AC_CHECK_HEADER(regex.h,
- AC_MSG_CHECKING([for broken regexec])
- AC_TRY_RUN([
+ AC_CACHE_CHECK([for broken regexec],
+ [nano_cv_func_regexec_segv_emptystr],
+ AC_TRY_RUN([
#include <sys/types.h>
#include <regex.h>
int main () { regex_t reg; size_t n = 1; regmatch_t r; regcomp(&reg, "\\<", 0); regexec(&reg, "", n, &r, 0); regfree(&reg); return 0; }],
- AC_MSG_RESULT(no),
- AC_MSG_RESULT(yes); AC_DEFINE(BROKEN_REGEXEC, 1, [Define this if your regexec() function segfaults when passed an empty string under certain conditions.])
+ [nano_cv_func_regexec_segv_emptystr=no],
+ [nano_cv_func_regexec_segv_emptystr=yes])
+ if test x$nano_cv_func_regexec_segv_emptystr = xyes; then
+ AC_DEFINE(BROKEN_REGEXEC, 1, [Define this if your regexec() function segfaults when passed an empty string under certain conditions.])
+ fi
)
)
---
configure.ac | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
--- nano-1.3.2.orig/configure.ac
+++ nano-1.3.2/configure.ac
@@ -39,13 +39,17 @@ dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(fcntl.h getopt.h libintl.h limits.h regex.h termio.h termios.h unistd.h)
AC_CHECK_HEADER(regex.h,
- AC_MSG_CHECKING([for broken regexec])
- AC_TRY_RUN([
+ AC_CACHE_CHECK([for broken regexec],
+ [nano_cv_func_regexec_segv_emptystr],
+ AC_TRY_RUN([
#include <sys/types.h>
#include <regex.h>
int main(void) { regex_t reg; size_t n = 1; regmatch_t r; regcomp(&reg, "\\<", 0); regexec(&reg, "", n, &r, 0); regfree(&reg); return 0; }],
- AC_MSG_RESULT(no),
- AC_MSG_RESULT(yes); AC_DEFINE(BROKEN_REGEXEC, 1, [Define this if your regexec() function segfaults when passed an empty string under certain conditions.])
+ [nano_cv_func_regexec_segv_emptystr=no],
+ [nano_cv_func_regexec_segv_emptystr=yes])
+ if test x$nano_cv_func_regexec_segv_emptystr = xyes; then
+ AC_DEFINE(BROKEN_REGEXEC, 1, [Define this if your regexec() function segfaults when passed an empty string under certain conditions.])
+ fi
)
)
---
configure.ac | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
--- nano-1.3.3.orig/configure.ac
+++ nano-1.3.3/configure.ac
@@ -40,8 +40,9 @@ dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(fcntl.h getopt.h libintl.h limits.h regex.h termio.h termios.h unistd.h)
AC_CHECK_HEADER(regex.h,
- AC_MSG_CHECKING([for broken regexec])
- AC_TRY_RUN([
+ AC_CACHE_CHECK([for broken regexec],
+ [nano_cv_func_regexec_segv_emptystr],
+ AC_TRY_RUN([
#include <sys/types.h>
#include <regex.h>
int main(void)
@@ -54,8 +55,11 @@ int main(void)
regfree(&reg);
return 0;
}],
- AC_MSG_RESULT(no),
- AC_MSG_RESULT(yes); AC_DEFINE(BROKEN_REGEXEC, 1, [Define this if your regexec() function segfaults when passed an empty string under certain conditions.])
+ [nano_cv_func_regexec_segv_emptystr=no],
+ [nano_cv_func_regexec_segv_emptystr=yes])
+ if test x$nano_cv_func_regexec_segv_emptystr = xyes; then
+ AC_DEFINE(BROKEN_REGEXEC, 1, [Define this if your regexec() function segfaults when passed an empty string under certain conditions.])
+ fi
)
)
--- nano-1.2.2.orig/configure.ac
+++ nano-1.2.2/configure.ac
@@ -39,13 +39,17 @@ dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(fcntl.h getopt.h libintl.h limits.h regex.h termio.h termios.h unistd.h)
AC_CHECK_HEADER(regex.h,
- AC_MSG_CHECKING([for broken regexec])
- AC_TRY_RUN([
+ AC_CACHE_CHECK([for broken regexec],
+ [nano_cv_func_regexec_segv_emptystr],
+ AC_TRY_RUN([
#include <sys/types.h>
#include <regex.h>
int main () { regex_t reg; size_t n = 1; regmatch_t r; regcomp(&reg, "\\<", 0); regexec(&reg, "", n, &r, 0); regfree(&reg); return 0; }],
- AC_MSG_RESULT(no),
- AC_MSG_RESULT(yes); AC_DEFINE(BROKEN_REGEXEC, 1, [Define this if your regexec() function segfaults when passed an empty string under certain conditions.])
+ [nano_cv_func_regexec_segv_emptystr=no],
+ [nano_cv_func_regexec_segv_emptystr=yes])
+ if test x$nano_cv_func_regexec_segv_emptystr = xyes; then
+ AC_DEFINE(BROKEN_REGEXEC, 1, [Define this if your regexec() function segfaults when passed an empty string under certain conditions.])
+ fi
)
)
# Macro to add for using GNU gettext.
# Ulrich Drepper <[email protected]>, 1995.
#
# This file can be copied and used freely without restrictions. It can
# be used in projects which are not available under the GNU Public License
# but which still want to provide support for the GNU gettext functionality.
# Please note that the actual code is *not* freely available.
# serial 108
AC_PREREQ(2.13) dnl Minimum Autoconf version required.
AC_DEFUN(NANO_AM_WITH_NLS,
[AC_MSG_CHECKING([whether NLS is requested])
dnl Default is enabled NLS
AC_ARG_ENABLE(nls,
[ --disable-nls do not use Native Language Support],
USE_NLS=$enableval, USE_NLS=yes)
AC_MSG_RESULT($USE_NLS)
AC_SUBST(USE_NLS)
USE_INCLUDED_LIBINTL=no
dnl If we use NLS figure out what method
if test "$USE_NLS" = "yes"; then
AC_DEFINE(ENABLE_NLS)
AC_MSG_CHECKING([whether included gettext is requested])
AC_ARG_WITH(included-gettext,
[ --with-included-gettext use the GNU gettext library included here],
nls_cv_force_use_gnu_gettext=$withval,
nls_cv_force_use_gnu_gettext=no)
AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
dnl User does not insist on using GNU NLS library. Figure out what
dnl to use. If gettext or catgets are available (in this order) we
dnl use this. Else we have to fall back to GNU NLS library.
dnl catgets is only used if permitted by option --with-catgets.
nls_cv_header_intl=
nls_cv_header_libgt=
CATOBJEXT=NONE
AC_CHECK_HEADER(libintl.h,
[AC_CACHE_CHECK([for gettext in libc], gt_cv_func_gettext_libc,
[AC_TRY_LINK([#include <libintl.h>], [return (int) gettext ("")],
gt_cv_func_gettext_libc=yes, gt_cv_func_gettext_libc=no)])
if test "$gt_cv_func_gettext_libc" != "yes"; then
AC_CHECK_LIB(intl, bindtextdomain,
[AC_CHECK_LIB(intl, gettext,
gt_cv_func_gettext_libintl=yes,
gt_cv_func_gettext_libintl=no)])
fi
if test "$gt_cv_func_gettext_libintl" = yes; then
LIBS="$LIBS -lintl"
fi
if test "$gt_cv_func_gettext_libc" = "yes" \
|| test "$gt_cv_func_gettext_libintl" = "yes"; then
AC_DEFINE(HAVE_GETTEXT)
NANO_AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
if test "$MSGFMT" != "no"; then
AC_CHECK_FUNCS(dcgettext)
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
NANO_AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
return _nl_msg_cat_cntr],
[CATOBJEXT=.gmo
DATADIRNAME=share],
[CATOBJEXT=.mo
DATADIRNAME=lib])
INSTOBJEXT=.mo
fi
fi
])
if test "$CATOBJEXT" = "NONE"; then
AC_MSG_CHECKING([whether catgets can be used])
AC_ARG_WITH(catgets,
[ --with-catgets use catgets functions if available],
nls_cv_use_catgets=$withval, nls_cv_use_catgets=no)
AC_MSG_RESULT($nls_cv_use_catgets)
if test "$nls_cv_use_catgets" = "yes"; then
dnl No gettext in C library. Try catgets next.
AC_CHECK_LIB(i, main)
AC_CHECK_FUNC(catgets,
[AC_DEFINE(HAVE_CATGETS, 1,
[Define as 1 if you have catgets and don't want to use GNU gettext.])
INTLOBJS="\$(CATOBJS)"
AC_PATH_PROG(GENCAT, gencat, no)dnl
if test "$GENCAT" != "no"; then
AC_PATH_PROG(GMSGFMT, gmsgfmt, no)
if test "$GMSGFMT" = "no"; then
NANO_AM_PATH_PROG_WITH_TEST(GMSGFMT, msgfmt,
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)
fi
NANO_AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
USE_INCLUDED_LIBINTL=yes
CATOBJEXT=.cat
INSTOBJEXT=.cat
DATADIRNAME=lib
INTLDEPS='$(top_builddir)/intl/libintl.a'
INTLLIBS=$INTLDEPS
LIBS=`echo $LIBS | sed -e 's/-lintl//'`
nls_cv_header_intl=intl/libintl.h
nls_cv_header_libgt=intl/libgettext.h
fi])
fi
fi
if test "$CATOBJEXT" = "NONE"; then
dnl Neither gettext nor catgets in included in the C library.
dnl Fall back on GNU gettext library.
nls_cv_use_gnu_gettext=yes
fi
fi
if test "$nls_cv_use_gnu_gettext" = "yes"; then
dnl Mark actions used to generate GNU NLS library.
INTLOBJS="\$(GETTOBJS)"
NANO_AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt)
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
NANO_AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
AC_SUBST(MSGFMT)
USE_INCLUDED_LIBINTL=yes
CATOBJEXT=.gmo
INSTOBJEXT=.mo
DATADIRNAME=share
INTLDEPS='$(top_builddir)/intl/libintl.a'
INTLLIBS=$INTLDEPS
LIBS=`echo $LIBS | sed -e 's/-lintl//'`
nls_cv_header_intl=intl/libintl.h
nls_cv_header_libgt=intl/libgettext.h
fi
dnl Test whether we really found GNU xgettext.
if test "$XGETTEXT" != ":"; then
dnl If it is no GNU xgettext we define it as : so that the
dnl Makefiles still can work.
if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
: ;
else
AC_MSG_RESULT(
[found xgettext program is not GNU xgettext; ignore it])
XGETTEXT=":"
fi
fi
# We need to process the po/ directory.
POSUB=po
else
DATADIRNAME=share
nls_cv_header_intl=intl/libintl.h
nls_cv_header_libgt=intl/libgettext.h
fi
if test -z "$nls_cv_header_intl"; then
# Clean out junk possibly left behind by a previous configuration.
rm -f intl/libintl.h
fi
AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl)
AC_OUTPUT_COMMANDS(
[case "$CONFIG_FILES" in *po/Makefile.in*)
sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
esac])
# If this is used in GNU gettext we have to set USE_NLS to `yes'
# because some of the sources are only built for this goal.
if test "$PACKAGE" = gettext; then
USE_NLS=yes
USE_INCLUDED_LIBINTL=yes
fi
dnl These rules are solely for the distribution goal. While doing this
dnl we only have to keep exactly one list of the available catalogs
dnl in configure.in.
for lang in $ALL_LINGUAS; do
GMOFILES="$GMOFILES $lang.gmo"
POFILES="$POFILES $lang.po"
done
dnl Make all variables we use known to autoconf.
AC_SUBST(USE_INCLUDED_LIBINTL)
AC_SUBST(CATALOGS)
AC_SUBST(CATOBJEXT)
AC_SUBST(DATADIRNAME)
AC_SUBST(GMOFILES)
AC_SUBST(INSTOBJEXT)
AC_SUBST(INTLDEPS)
AC_SUBST(INTLLIBS)
AC_SUBST(INTLOBJS)
AC_SUBST(POFILES)
AC_SUBST(POSUB)
])
AC_DEFUN(NANO_AM_GNU_GETTEXT,
[AC_REQUIRE([AC_PROG_MAKE_SET])dnl
AC_REQUIRE([AC_PROG_CC])dnl
AC_REQUIRE([AC_PROG_RANLIB])dnl
AC_REQUIRE([AC_ISC_POSIX])dnl
AC_REQUIRE([AC_HEADER_STDC])dnl
AC_REQUIRE([AC_C_CONST])dnl
AC_REQUIRE([AC_C_INLINE])dnl
AC_REQUIRE([AC_TYPE_OFF_T])dnl
AC_REQUIRE([AC_TYPE_SIZE_T])dnl
AC_REQUIRE([AC_FUNC_ALLOCA])dnl
AC_REQUIRE([AC_FUNC_MMAP])dnl
AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \
unistd.h sys/param.h])
AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \
strdup __argz_count __argz_stringify __argz_next])
if test "${ac_cv_func_stpcpy+set}" != "set"; then
AC_CHECK_FUNCS(stpcpy)
fi
if test "${ac_cv_func_stpcpy}" = "yes"; then
AC_DEFINE(HAVE_STPCPY, 1, [Define to 1 if you have the stpcpy function.])
fi
NANO_AM_LC_MESSAGES
NANO_AM_WITH_NLS
if test "x$CATOBJEXT" != "x"; then
if test "x$ALL_LINGUAS" = "x"; then
LINGUAS=
else
AC_MSG_CHECKING(for catalogs to be installed)
NEW_LINGUAS=
for lang in ${LINGUAS=$ALL_LINGUAS}; do
case "$ALL_LINGUAS" in
*$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
esac
done
LINGUAS=$NEW_LINGUAS
AC_MSG_RESULT($LINGUAS)
fi
dnl Construct list of names of catalog files to be constructed.
if test -n "$LINGUAS"; then
for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
fi
fi
dnl The reference to <locale.h> in the installed <libintl.h> file
dnl must be resolved because we cannot expect the users of this
dnl to define HAVE_LOCALE_H.
if test $ac_cv_header_locale_h = yes; then
INCLUDE_LOCALE_H="#include <locale.h>"
else
INCLUDE_LOCALE_H="\
/* The system does not provide the header <locale.h>. Take care yourself. */"
fi
AC_SUBST(INCLUDE_LOCALE_H)
dnl Determine which catalog format we have (if any is needed)
dnl For now we know about two different formats:
dnl Linux libc-5 and the normal X/Open format
test -d intl || mkdir intl
if test "$CATOBJEXT" = ".cat"; then
AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen)
dnl Transform the SED scripts while copying because some dumb SEDs
dnl cannot handle comments.
sed -e '/^#/d' $srcdir/intl/$msgformat-msg.sed > intl/po2msg.sed
fi
dnl po2tbl.sed is always needed.
sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
$srcdir/intl/po2tbl.sed.in > intl/po2tbl.sed
dnl In the intl/Makefile.in we have a special dependency which makes
dnl only sense for gettext. We comment this out for non-gettext
dnl packages.
if test "$PACKAGE" = "gettext"; then
GT_NO="#NO#"
GT_YES=
else
GT_NO=
GT_YES="#YES#"
fi
AC_SUBST(GT_NO)
AC_SUBST(GT_YES)
dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
dnl Try to locate is.
MKINSTALLDIRS=
if test -n "$ac_aux_dir"; then
MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
fi
if test -z "$MKINSTALLDIRS"; then
MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
fi
AC_SUBST(MKINSTALLDIRS)
dnl *** For now the libtool support in intl/Makefile is not for real.
l=
AC_SUBST(l)
dnl Generate list of files to be processed by xgettext which will
dnl be included in po/Makefile.
test -d po || mkdir po
case "$srcdir" in
.)
posrcprefix="../" ;;
/* | [[A-Za-z]]:*)
posrcprefix="$srcdir/" ;;
*)
posrcprefix="../$srcdir/" ;;
esac
rm -f po/POTFILES
sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
< $srcdir/po/POTFILES.in > po/POTFILES
])
# Configure paths for GLIB
# Owen Taylor 97-11-3
dnl AM_PATH_GLIB([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if "gmodule" or
dnl gthread is specified in MODULES, pass to glib-config
dnl
AC_DEFUN(AM_PATH_GLIB,
[dnl
dnl Get the cflags and libraries from the glib-config script
dnl
AC_ARG_WITH(glib-prefix,[ --with-glib-prefix=PFX Prefix where GLIB is installed (optional)],
glib_config_prefix="$withval", glib_config_prefix="")
AC_ARG_WITH(glib-exec-prefix,[ --with-glib-exec-prefix=PFX Exec prefix where GLIB is installed (optional)],
glib_config_exec_prefix="$withval", glib_config_exec_prefix="")
AC_ARG_ENABLE(glibtest, [ --disable-glibtest Do not try to compile and run a test GLIB program],
, enable_glibtest=yes)
if test x$glib_config_exec_prefix != x ; then
glib_config_args="$glib_config_args --exec-prefix=$glib_config_exec_prefix"
if test x${GLIB_CONFIG+set} != xset ; then
GLIB_CONFIG=$glib_config_exec_prefix/bin/glib-config
fi
fi
if test x$glib_config_prefix != x ; then
glib_config_args="$glib_config_args --prefix=$glib_config_prefix"
if test x${GLIB_CONFIG+set} != xset ; then
GLIB_CONFIG=$glib_config_prefix/bin/glib-config
fi
fi
for module in . $4
do
case "$module" in
gmodule)
glib_config_args="$glib_config_args gmodule"
;;
gthread)
glib_config_args="$glib_config_args gthread"
;;
esac
done
AC_PATH_PROG(GLIB_CONFIG, glib-config, no)
min_glib_version=ifelse([$1], ,0.99.7,$1)
AC_MSG_CHECKING(for GLIB - version >= $min_glib_version)
no_glib=""
if test "$GLIB_CONFIG" = "no" ; then
no_glib=yes
else
GLIB_CFLAGS=`$GLIB_CONFIG $glib_config_args --cflags`
GLIB_LIBS=`$GLIB_CONFIG $glib_config_args --libs`
glib_config_major_version=`$GLIB_CONFIG $glib_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
glib_config_minor_version=`$GLIB_CONFIG $glib_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
glib_config_micro_version=`$GLIB_CONFIG $glib_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
if test "x$enable_glibtest" = "xyes" ; then
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $GLIB_CFLAGS"
LIBS="$GLIB_LIBS $LIBS"
dnl
dnl Now check if the installed GLIB is sufficiently new. (Also sanity
dnl checks the results of glib-config to some extent
dnl
rm -f conf.glibtest
AC_TRY_RUN([
#include <glib.h>
#include <stdio.h>
#include <stdlib.h>
int
main ()
{
int major, minor, micro;
char *tmp_version;
system ("touch conf.glibtest");
/* HP/UX 9 (%@#!) writes to sscanf strings */
tmp_version = g_strdup("$min_glib_version");
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
printf("%s, bad version string\n", "$min_glib_version");
exit(1);
}
if ((glib_major_version != $glib_config_major_version) ||
(glib_minor_version != $glib_config_minor_version) ||
(glib_micro_version != $glib_config_micro_version))
{
printf("\n*** 'glib-config --version' returned %d.%d.%d, but GLIB (%d.%d.%d)\n",
$glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
glib_major_version, glib_minor_version, glib_micro_version);
printf ("*** was found! If glib-config was correct, then it is best\n");
printf ("*** to remove the old version of GLIB. You may also be able to fix the error\n");
printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
printf("*** required on your system.\n");
printf("*** If glib-config was wrong, set the environment variable GLIB_CONFIG\n");
printf("*** to point to the correct copy of glib-config, and remove the file config.cache\n");
printf("*** before re-running configure\n");
}
else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
(glib_minor_version != GLIB_MINOR_VERSION) ||
(glib_micro_version != GLIB_MICRO_VERSION))
{
printf("*** GLIB header files (version %d.%d.%d) do not match\n",
GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
printf("*** library (version %d.%d.%d)\n",
glib_major_version, glib_minor_version, glib_micro_version);
}
else
{
if ((glib_major_version > major) ||
((glib_major_version == major) && (glib_minor_version > minor)) ||
((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
{
return 0;
}
else
{
printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n",
glib_major_version, glib_minor_version, glib_micro_version);
printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n",
major, minor, micro);
printf("*** GLIB is always available from ftp://ftp.gtk.org.\n");
printf("***\n");
printf("*** If you have already installed a sufficiently new version, this error\n");
printf("*** probably means that the wrong copy of the glib-config shell script is\n");
printf("*** being found. The easiest way to fix this is to remove the old version\n");
printf("*** of GLIB, but you can also set the GLIB_CONFIG environment to point to the\n");
printf("*** correct copy of glib-config. (In this case, you will have to\n");
printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
printf("*** so that the correct libraries are found at run-time))\n");
}
}
return 1;
}
],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
if test "x$no_glib" = x ; then
AC_MSG_RESULT(yes)
ifelse([$2], , :, [$2])
else
AC_MSG_RESULT(no)
if test "$GLIB_CONFIG" = "no" ; then
echo "*** The glib-config script installed by GLIB could not be found"
echo "*** If GLIB was installed in PREFIX, make sure PREFIX/bin is in"
echo "*** your path, or set the GLIB_CONFIG environment variable to the"
echo "*** full path to glib-config."
else
if test -f conf.glibtest ; then
:
else
echo "*** Could not run GLIB test program, checking why..."
CFLAGS="$CFLAGS $GLIB_CFLAGS"
LIBS="$LIBS $GLIB_LIBS"
AC_TRY_LINK([
#include <glib.h>
#include <stdio.h>
], [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ],
[ echo "*** The test program compiled, but did not run. This usually means"
echo "*** that the run-time linker is not finding GLIB or finding the wrong"
echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your"
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
echo "*** to the installed location Also, make sure you have run ldconfig if that"
echo "*** is required on your system"
echo "***"
echo "*** If you have an old version installed, it is best to remove it, although"
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
echo "***"
echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
echo "*** came with the system with the command"
echo "***"
echo "*** rpm --erase --nodeps gtk gtk-devel" ],
[ echo "*** The test program failed to compile or link. See the file config.log for the"
echo "*** exact error that occured. This usually means GLIB was incorrectly installed"
echo "*** or that you have moved GLIB since it was installed. In the latter case, you"
echo "*** may want to edit the glib-config script: $GLIB_CONFIG" ])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
GLIB_CFLAGS=""
GLIB_LIBS=""
ifelse([$3], , :, [$3])
fi
AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_LIBS)
rm -f conf.glibtest
])
# Configure paths for GLIB
# Owen Taylor 97-11-3
dnl AM_PATH_GLIB([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if "gmodule" or
dnl gthread is specified in MODULES, pass to glib-config
dnl
AC_DEFUN(AM_PATH_GLIB,
[dnl
dnl Get the cflags and libraries from the glib-config script
dnl
AC_ARG_WITH(glib-prefix,[ --with-glib-prefix=PFX Prefix where GLIB is installed (optional)],
glib_config_prefix="$withval", glib_config_prefix="")
AC_ARG_WITH(glib-exec-prefix,[ --with-glib-exec-prefix=PFX Exec prefix where GLIB is installed (optional)],
glib_config_exec_prefix="$withval", glib_config_exec_prefix="")
AC_ARG_ENABLE(glibtest, [ --disable-glibtest Do not try to compile and run a test GLIB program],
, enable_glibtest=yes)
if test x$glib_config_exec_prefix != x ; then
glib_config_args="$glib_config_args --exec-prefix=$glib_config_exec_prefix"
if test x${GLIB_CONFIG+set} != xset ; then
GLIB_CONFIG=$glib_config_exec_prefix/bin/glib-config
fi
fi
if test x$glib_config_prefix != x ; then
glib_config_args="$glib_config_args --prefix=$glib_config_prefix"
if test x${GLIB_CONFIG+set} != xset ; then
GLIB_CONFIG=$glib_config_prefix/bin/glib-config
fi
fi
for module in . $4
do
case "$module" in
gmodule)
glib_config_args="$glib_config_args gmodule"
;;
gthread)
glib_config_args="$glib_config_args gthread"
;;
esac
done
AC_PATH_PROG(GLIB_CONFIG, glib-config, no)
min_glib_version=ifelse([$1], ,0.99.7,$1)
AC_MSG_CHECKING(for GLIB - version >= $min_glib_version)
no_glib=""
if test "$GLIB_CONFIG" = "no" ; then
no_glib=yes
else
GLIB_CFLAGS=`$GLIB_CONFIG $glib_config_args --cflags`
GLIB_LIBS=`$GLIB_CONFIG $glib_config_args --libs`
glib_config_major_version=`$GLIB_CONFIG $glib_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
glib_config_minor_version=`$GLIB_CONFIG $glib_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
glib_config_micro_version=`$GLIB_CONFIG $glib_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
if test "x$enable_glibtest" = "xyes" ; then
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $GLIB_CFLAGS"
LIBS="$GLIB_LIBS $LIBS"
dnl
dnl Now check if the installed GLIB is sufficiently new. (Also sanity
dnl checks the results of glib-config to some extent
dnl
rm -f conf.glibtest
AC_TRY_RUN([
#include <glib.h>
#include <stdio.h>
#include <stdlib.h>
int
main ()
{
int major, minor, micro;
char *tmp_version;
system ("touch conf.glibtest");
/* HP/UX 9 (%@#!) writes to sscanf strings */
tmp_version = g_strdup("$min_glib_version");
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
printf("%s, bad version string\n", "$min_glib_version");
exit(1);
}
if ((glib_major_version != $glib_config_major_version) ||
(glib_minor_version != $glib_config_minor_version) ||
(glib_micro_version != $glib_config_micro_version))
{
printf("\n*** 'glib-config --version' returned %d.%d.%d, but GLIB (%d.%d.%d)\n",
$glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
glib_major_version, glib_minor_version, glib_micro_version);
printf ("*** was found! If glib-config was correct, then it is best\n");
printf ("*** to remove the old version of GLIB. You may also be able to fix the error\n");
printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
printf("*** required on your system.\n");
printf("*** If glib-config was wrong, set the environment variable GLIB_CONFIG\n");
printf("*** to point to the correct copy of glib-config, and remove the file config.cache\n");
printf("*** before re-running configure\n");
}
else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
(glib_minor_version != GLIB_MINOR_VERSION) ||
(glib_micro_version != GLIB_MICRO_VERSION))
{
printf("*** GLIB header files (version %d.%d.%d) do not match\n",
GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
printf("*** library (version %d.%d.%d)\n",
glib_major_version, glib_minor_version, glib_micro_version);
}
else
{
if ((glib_major_version > major) ||
((glib_major_version == major) && (glib_minor_version > minor)) ||
((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
{
return 0;
}
else
{
printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n",
glib_major_version, glib_minor_version, glib_micro_version);
printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n",
major, minor, micro);
printf("*** GLIB is always available from ftp://ftp.gtk.org.\n");
printf("***\n");
printf("*** If you have already installed a sufficiently new version, this error\n");
printf("*** probably means that the wrong copy of the glib-config shell script is\n");
printf("*** being found. The easiest way to fix this is to remove the old version\n");
printf("*** of GLIB, but you can also set the GLIB_CONFIG environment to point to the\n");
printf("*** correct copy of glib-config. (In this case, you will have to\n");
printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
printf("*** so that the correct libraries are found at run-time))\n");
}
}
return 1;
}
],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
if test "x$no_glib" = x ; then
AC_MSG_RESULT(yes)
ifelse([$2], , :, [$2])
else
AC_MSG_RESULT(no)
if test "$GLIB_CONFIG" = "no" ; then
echo "*** The glib-config script installed by GLIB could not be found"
echo "*** If GLIB was installed in PREFIX, make sure PREFIX/bin is in"
echo "*** your path, or set the GLIB_CONFIG environment variable to the"
echo "*** full path to glib-config."
else
if test -f conf.glibtest ; then
:
else
echo "*** Could not run GLIB test program, checking why..."
CFLAGS="$CFLAGS $GLIB_CFLAGS"
LIBS="$LIBS $GLIB_LIBS"
AC_TRY_LINK([
#include <glib.h>
#include <stdio.h>
], [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ],
[ echo "*** The test program compiled, but did not run. This usually means"
echo "*** that the run-time linker is not finding GLIB or finding the wrong"
echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your"
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
echo "*** to the installed location Also, make sure you have run ldconfig if that"
echo "*** is required on your system"
echo "***"
echo "*** If you have an old version installed, it is best to remove it, although"
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
echo "***"
echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
echo "*** came with the system with the command"
echo "***"
echo "*** rpm --erase --nodeps gtk gtk-devel" ],
[ echo "*** The test program failed to compile or link. See the file config.log for the"
echo "*** exact error that occured. This usually means GLIB was incorrectly installed"
echo "*** or that you have moved GLIB since it was installed. In the latter case, you"
echo "*** may want to edit the glib-config script: $GLIB_CONFIG" ])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
GLIB_CFLAGS=""
GLIB_LIBS=""
ifelse([$3], , :, [$3])
fi
AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_LIBS)
rm -f conf.glibtest
])
dnl AM_PATH_GLIB_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if gmodule, gobject or
dnl gthread is specified in MODULES, pass to pkg-config
dnl
AC_DEFUN(AM_PATH_GLIB_2_0,
[dnl
dnl Get the cflags and libraries from pkg-config
dnl
AC_ARG_ENABLE(glibtest, [ --disable-glibtest do not try to compile and run a test GLIB program],
, enable_glibtest=yes)
pkg_config_args=glib-2.0
for module in . $4
do
case "$module" in
gmodule)
pkg_config_args="$pkg_config_args gmodule-2.0"
;;
gobject)
pkg_config_args="$pkg_config_args gobject-2.0"
;;
gthread)
pkg_config_args="$pkg_config_args gthread-2.0"
;;
esac
done
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
no_glib=""
if test x$PKG_CONFIG != xno ; then
if $PKG_CONFIG --atleast-pkgconfig-version 0.7 ; then
:
else
echo *** pkg-config too old; version 0.7 or better required.
no_glib=yes
PKG_CONFIG=no
fi
else
no_glib=yes
fi
min_glib_version=ifelse([$1], ,2.0.0,$1)
AC_MSG_CHECKING(for GLIB - version >= $min_glib_version)
if test x$PKG_CONFIG != xno ; then
## don't try to run the test against uninstalled libtool libs
if $PKG_CONFIG --uninstalled $pkg_config_args; then
echo "Will use uninstalled version of GLib found in PKG_CONFIG_PATH"
enable_glibtest=no
fi
if $PKG_CONFIG --atleast-version $min_glib_version $pkg_config_args; then
:
else
no_glib=yes
fi
fi
if test x"$no_glib" = x ; then
GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`
GOBJECT_QUERY=`$PKG_CONFIG --variable=gobject_query glib-2.0`
GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0`
GLIB_CFLAGS=`$PKG_CONFIG --cflags $pkg_config_args`
GLIB_LIBS=`$PKG_CONFIG --libs $pkg_config_args`
glib_config_major_version=`$PKG_CONFIG --modversion glib-2.0 | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
glib_config_minor_version=`$PKG_CONFIG --modversion glib-2.0 | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
glib_config_micro_version=`$PKG_CONFIG --modversion glib-2.0 | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
if test "x$enable_glibtest" = "xyes" ; then
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $GLIB_CFLAGS"
LIBS="$GLIB_LIBS $LIBS"
dnl
dnl Now check if the installed GLIB is sufficiently new. (Also sanity
dnl checks the results of pkg-config to some extent)
dnl
rm -f conf.glibtest
AC_TRY_RUN([
#include <glib.h>
#include <stdio.h>
#include <stdlib.h>
int
main ()
{
int major, minor, micro;
char *tmp_version;
system ("touch conf.glibtest");
/* HP/UX 9 (%@#!) writes to sscanf strings */
tmp_version = g_strdup("$min_glib_version");
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
printf("%s, bad version string\n", "$min_glib_version");
exit(1);
}
if ((glib_major_version != $glib_config_major_version) ||
(glib_minor_version != $glib_config_minor_version) ||
(glib_micro_version != $glib_config_micro_version))
{
printf("\n*** 'pkg-config --modversion glib-2.0' returned %d.%d.%d, but GLIB (%d.%d.%d)\n",
$glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
glib_major_version, glib_minor_version, glib_micro_version);
printf ("*** was found! If pkg-config was correct, then it is best\n");
printf ("*** to remove the old version of GLib. You may also be able to fix the error\n");
printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
printf("*** required on your system.\n");
printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
printf("*** to point to the correct configuration files\n");
}
else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
(glib_minor_version != GLIB_MINOR_VERSION) ||
(glib_micro_version != GLIB_MICRO_VERSION))
{
printf("*** GLIB header files (version %d.%d.%d) do not match\n",
GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
printf("*** library (version %d.%d.%d)\n",
glib_major_version, glib_minor_version, glib_micro_version);
}
else
{
if ((glib_major_version > major) ||
((glib_major_version == major) && (glib_minor_version > minor)) ||
((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
{
return 0;
}
else
{
printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n",
glib_major_version, glib_minor_version, glib_micro_version);
printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n",
major, minor, micro);
printf("*** GLIB is always available from ftp://ftp.gtk.org.\n");
printf("***\n");
printf("*** If you have already installed a sufficiently new version, this error\n");
printf("*** probably means that the wrong copy of the pkg-config shell script is\n");
printf("*** being found. The easiest way to fix this is to remove the old version\n");
printf("*** of GLIB, but you can also set the PKG_CONFIG environment to point to the\n");
printf("*** correct copy of pkg-config. (In this case, you will have to\n");
printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
printf("*** so that the correct libraries are found at run-time))\n");
}
}
return 1;
}
],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
if test "x$no_glib" = x ; then
AC_MSG_RESULT(yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version))
ifelse([$2], , :, [$2])
else
AC_MSG_RESULT(no)
if test "$PKG_CONFIG" = "no" ; then
echo "*** A new enough version of pkg-config was not found."
echo "*** See http://www.freedesktop.org/software/pkgconfig/"
else
if test -f conf.glibtest ; then
:
else
echo "*** Could not run GLIB test program, checking why..."
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $GLIB_CFLAGS"
LIBS="$LIBS $GLIB_LIBS"
AC_TRY_LINK([
#include <glib.h>
#include <stdio.h>
], [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ],
[ echo "*** The test program compiled, but did not run. This usually means"
echo "*** that the run-time linker is not finding GLIB or finding the wrong"
echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your"
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
echo "*** to the installed location Also, make sure you have run ldconfig if that"
echo "*** is required on your system"
echo "***"
echo "*** If you have an old version installed, it is best to remove it, although"
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
[ echo "*** The test program failed to compile or link. See the file config.log for the"
echo "*** exact error that occured. This usually means GLIB is incorrectly installed."])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
GLIB_CFLAGS=""
GLIB_LIBS=""
GLIB_GENMARSHAL=""
GOBJECT_QUERY=""
GLIB_MKENUMS=""
ifelse([$3], , :, [$3])
fi
AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_LIBS)
AC_SUBST(GLIB_GENMARSHAL)
AC_SUBST(GOBJECT_QUERY)
AC_SUBST(GLIB_MKENUMS)
rm -f conf.glibtest
])
# Configure paths for GLIB
# Owen Taylor 97-11-3
dnl AM_PATH_GLIB([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if "gmodule" or
dnl gthread is specified in MODULES, pass to glib-config
dnl
AC_DEFUN(AM_PATH_GLIB,
[dnl
dnl Get the cflags and libraries from the glib-config script
dnl
AC_ARG_WITH(glib-prefix,[ --with-glib-prefix=PFX Prefix where GLIB is installed (optional)],
glib_config_prefix="$withval", glib_config_prefix="")
AC_ARG_WITH(glib-exec-prefix,[ --with-glib-exec-prefix=PFX Exec prefix where GLIB is installed (optional)],
glib_config_exec_prefix="$withval", glib_config_exec_prefix="")
AC_ARG_ENABLE(glibtest, [ --disable-glibtest Do not try to compile and run a test GLIB program],
, enable_glibtest=yes)
if test x$glib_config_exec_prefix != x ; then
glib_config_args="$glib_config_args --exec-prefix=$glib_config_exec_prefix"
if test x${GLIB_CONFIG+set} != xset ; then
GLIB_CONFIG=$glib_config_exec_prefix/bin/glib-config
fi
fi
if test x$glib_config_prefix != x ; then
glib_config_args="$glib_config_args --prefix=$glib_config_prefix"
if test x${GLIB_CONFIG+set} != xset ; then
GLIB_CONFIG=$glib_config_prefix/bin/glib-config
fi
fi
for module in . $4
do
case "$module" in
gmodule)
glib_config_args="$glib_config_args gmodule"
;;
gthread)
glib_config_args="$glib_config_args gthread"
;;
esac
done
AC_PATH_PROG(GLIB_CONFIG, glib-config, no)
min_glib_version=ifelse([$1], ,0.99.7,$1)
AC_MSG_CHECKING(for GLIB - version >= $min_glib_version)
no_glib=""
if test "$GLIB_CONFIG" = "no" ; then
no_glib=yes
else
GLIB_CFLAGS=`$GLIB_CONFIG $glib_config_args --cflags`
GLIB_LIBS=`$GLIB_CONFIG $glib_config_args --libs`
glib_config_major_version=`$GLIB_CONFIG $glib_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
glib_config_minor_version=`$GLIB_CONFIG $glib_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
glib_config_micro_version=`$GLIB_CONFIG $glib_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
if test "x$enable_glibtest" = "xyes" ; then
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $GLIB_CFLAGS"
LIBS="$GLIB_LIBS $LIBS"
dnl
dnl Now check if the installed GLIB is sufficiently new. (Also sanity
dnl checks the results of glib-config to some extent
dnl
rm -f conf.glibtest
AC_TRY_RUN([
#include <glib.h>
#include <stdio.h>
#include <stdlib.h>
int
main ()
{
int major, minor, micro;
char *tmp_version;
system ("touch conf.glibtest");
/* HP/UX 9 (%@#!) writes to sscanf strings */
tmp_version = g_strdup("$min_glib_version");
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
printf("%s, bad version string\n", "$min_glib_version");
exit(1);
}
if ((glib_major_version != $glib_config_major_version) ||
(glib_minor_version != $glib_config_minor_version) ||
(glib_micro_version != $glib_config_micro_version))
{
printf("\n*** 'glib-config --version' returned %d.%d.%d, but GLIB (%d.%d.%d)\n",
$glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
glib_major_version, glib_minor_version, glib_micro_version);
printf ("*** was found! If glib-config was correct, then it is best\n");
printf ("*** to remove the old version of GLIB. You may also be able to fix the error\n");
printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
printf("*** required on your system.\n");
printf("*** If glib-config was wrong, set the environment variable GLIB_CONFIG\n");
printf("*** to point to the correct copy of glib-config, and remove the file config.cache\n");
printf("*** before re-running configure\n");
}
else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
(glib_minor_version != GLIB_MINOR_VERSION) ||
(glib_micro_version != GLIB_MICRO_VERSION))
{
printf("*** GLIB header files (version %d.%d.%d) do not match\n",
GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
printf("*** library (version %d.%d.%d)\n",
glib_major_version, glib_minor_version, glib_micro_version);
}
else
{
if ((glib_major_version > major) ||
((glib_major_version == major) && (glib_minor_version > minor)) ||
((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
{
return 0;
}
else
{
printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n",
glib_major_version, glib_minor_version, glib_micro_version);
printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n",
major, minor, micro);
printf("*** GLIB is always available from ftp://ftp.gtk.org.\n");
printf("***\n");
printf("*** If you have already installed a sufficiently new version, this error\n");
printf("*** probably means that the wrong copy of the glib-config shell script is\n");
printf("*** being found. The easiest way to fix this is to remove the old version\n");
printf("*** of GLIB, but you can also set the GLIB_CONFIG environment to point to the\n");
printf("*** correct copy of glib-config. (In this case, you will have to\n");
printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
printf("*** so that the correct libraries are found at run-time))\n");
}
}
return 1;
}
],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
if test "x$no_glib" = x ; then
AC_MSG_RESULT(yes)
ifelse([$2], , :, [$2])
else
AC_MSG_RESULT(no)
if test "$GLIB_CONFIG" = "no" ; then
echo "*** The glib-config script installed by GLIB could not be found"
echo "*** If GLIB was installed in PREFIX, make sure PREFIX/bin is in"
echo "*** your path, or set the GLIB_CONFIG environment variable to the"
echo "*** full path to glib-config."
else
if test -f conf.glibtest ; then
:
else
echo "*** Could not run GLIB test program, checking why..."
CFLAGS="$CFLAGS $GLIB_CFLAGS"
LIBS="$LIBS $GLIB_LIBS"
AC_TRY_LINK([
#include <glib.h>
#include <stdio.h>
], [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ],
[ echo "*** The test program compiled, but did not run. This usually means"
echo "*** that the run-time linker is not finding GLIB or finding the wrong"
echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your"
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
echo "*** to the installed location Also, make sure you have run ldconfig if that"
echo "*** is required on your system"
echo "***"
echo "*** If you have an old version installed, it is best to remove it, although"
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
echo "***"
echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
echo "*** came with the system with the command"
echo "***"
echo "*** rpm --erase --nodeps gtk gtk-devel" ],
[ echo "*** The test program failed to compile or link. See the file config.log for the"
echo "*** exact error that occured. This usually means GLIB was incorrectly installed"
echo "*** or that you have moved GLIB since it was installed. In the latter case, you"
echo "*** may want to edit the glib-config script: $GLIB_CONFIG" ])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
GLIB_CFLAGS=""
GLIB_LIBS=""
ifelse([$3], , :, [$3])
fi
AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_LIBS)
rm -f conf.glibtest
])
#serial 19
dnl By default, many hosts won't let programs access large files;
dnl one must use special compiler options to get large-file access to work.
dnl For more details about this brain damage please see:
dnl http://www.sas.com/standards/large.file/x_open.20Mar96.html
dnl Written by Paul Eggert <[email protected]>.
dnl Internal subroutine of AC_SYS_LARGEFILE.
dnl AC_SYS_LARGEFILE_TEST_INCLUDES
AC_DEFUN(AC_SYS_LARGEFILE_TEST_INCLUDES,
[[#include <sys/types.h>
/* Check that off_t can represent 2**63 - 1 correctly.
We can't simply "#define LARGE_OFF_T 9223372036854775807",
since some C++ compilers masquerading as C compilers
incorrectly reject 9223372036854775807. */
# define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
&& LARGE_OFF_T % 2147483647 == 1)
? 1 : -1];
]])
dnl Internal subroutine of AC_SYS_LARGEFILE.
dnl AC_SYS_LARGEFILE_MACRO_VALUE(C-MACRO, VALUE, CACHE-VAR, COMMENT, INCLUDES, FUNCTION-BODY)
AC_DEFUN(AC_SYS_LARGEFILE_MACRO_VALUE,
[AC_CACHE_CHECK([for $1 value needed for large files], $3,
[$3=no
AC_TRY_COMPILE([$5],
[$6],
,
[AC_TRY_COMPILE([#define $1 $2]
[$5]
,
[$6],
[$3=$2])])])
if test "[$]$3" != no; then
AC_DEFINE_UNQUOTED([$1], [$]$3, [$4])
fi])
AC_DEFUN(NANO_AC_SYS_LARGEFILE,
[AC_REQUIRE([AC_PROG_CC])
AC_ARG_ENABLE(largefile,
[ --disable-largefile omit support for large files])
if test "$enable_largefile" != no; then
AC_CACHE_CHECK([for special C compiler options needed for large files],
ac_cv_sys_largefile_CC,
[ac_cv_sys_largefile_CC=no
if test "$GCC" != yes; then
# IRIX 6.2 and later do not support large files by default,
# so use the C compiler's -n32 option if that helps.
AC_TRY_COMPILE(AC_SYS_LARGEFILE_TEST_INCLUDES, , ,
[ac_save_CC="$CC"
CC="$CC -n32"
AC_TRY_COMPILE(AC_SYS_LARGEFILE_TEST_INCLUDES, ,
ac_cv_sys_largefile_CC=' -n32')
CC="$ac_save_CC"])
fi])
if test "$ac_cv_sys_largefile_CC" != no; then
CC="$CC$ac_cv_sys_largefile_CC"
fi
AC_SYS_LARGEFILE_MACRO_VALUE(_FILE_OFFSET_BITS, 64,
ac_cv_sys_file_offset_bits,
[Number of bits in a file offset, on hosts where this is settable.],
AC_SYS_LARGEFILE_TEST_INCLUDES)
AC_SYS_LARGEFILE_MACRO_VALUE(_LARGE_FILES, 1,
ac_cv_sys_large_files,
[Define for large files, on AIX-style hosts.],
AC_SYS_LARGEFILE_TEST_INCLUDES)
fi
])
AC_DEFUN(AC_FUNC_FSEEKO,
[AC_SYS_LARGEFILE_MACRO_VALUE(_LARGEFILE_SOURCE, 1,
ac_cv_sys_largefile_source,
[Define to make fseeko visible on some hosts (e.g. glibc 2.2).],
[#include <stdio.h>], [return !fseeko;])
# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
# in glibc 2.1.3, but that breaks too many other things.
# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
AC_CACHE_CHECK([for fseeko], ac_cv_func_fseeko,
[ac_cv_func_fseeko=no
AC_TRY_LINK([#include <stdio.h>],
[return fseeko && fseeko (stdin, 0, 0);],
[ac_cv_func_fseeko=yes])])
if test $ac_cv_func_fseeko != no; then
AC_DEFINE(HAVE_FSEEKO, 1,
[Define if fseeko (and presumably ftello) exists and is declared.])
fi])
# Check whether LC_MESSAGES is available in <locale.h>.
# Ulrich Drepper <[email protected]>, 1995.
#
# This file can be copied and used freely without restrictions. It can
# be used in projects which are not available under the GNU Public License
# but which still want to provide support for the GNU gettext functionality.
# Please note that the actual code is *not* freely available.
# serial 2
AC_PREREQ(2.13) dnl Minimum Autoconf version required.
AC_DEFUN(NANO_AM_LC_MESSAGES,
[if test $ac_cv_header_locale_h = yes; then
AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
if test $am_cv_val_LC_MESSAGES = yes; then
AC_DEFINE(HAVE_LC_MESSAGES, 1,
[Define if your locale.h file contains LC_MESSAGES.])
fi
fi])
---
Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- nano-1.0.6.orig/Makefile.am
+++ nano-1.0.6/Makefile.am
@@ -24,4 +24,4 @@ EXTRA_DIST = ABOUT-NLS AUTHORS BUGS COPY
SUBDIRS = po intl
localedir = $(datadir)/locale
-INCLUDES = -Iintl -DLOCALEDIR=\"$(localedir)\" -I@includedir@
+INCLUDES = -Iintl -DLOCALEDIR=\"$(localedir)\"
---
Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- nano-1.0.7.orig/Makefile.am
+++ nano-1.0.7/Makefile.am
@@ -30,7 +30,7 @@ EXTRA_DIST = ABOUT-NLS AUTHORS BUGS COPY
SUBDIRS = po intl
localedir = $(datadir)/locale
-INCLUDES = -Iintl -DLOCALEDIR=\"$(localedir)\" -I@includedir@
+INCLUDES = -Iintl -DLOCALEDIR=\"$(localedir)\"
$(srcdir)/acinclude.m4: $(ACINCLUDE_INPUTS)
cat $(ACINCLUDE_INPUTS) > $@
---
Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- nano-1.2.0.orig/Makefile.am
+++ nano-1.2.0/Makefile.am
@@ -31,6 +31,6 @@ EXTRA_DIST = ABOUT-NLS AUTHORS BUGS COPY
SUBDIRS = po m4
localedir = $(datadir)/locale
-INCLUDES = -Iintl -DLOCALEDIR=\"$(localedir)\" -I@includedir@
+INCLUDES = -Iintl -DLOCALEDIR=\"$(localedir)\"
ACLOCAL_AMFLAGS = -I m4
---
src/Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- nano-1.3.4.orig/src/Makefile.am
+++ nano-1.3.4/src/Makefile.am
@@ -1,6 +1,6 @@
DEFS= -DSYSCONFDIR=\"$(sysconfdir)\"
localedir = $(datadir)/locale
-INCLUDES = -Iintl -DLOCALEDIR=\"$(localedir)\" -I@includedir@
+INCLUDES = -Iintl -DLOCALEDIR=\"$(localedir)\"
ACLOCAL_AMFLAGS = -I m4
---
src/Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- nano-1.3.1.orig/src/Makefile.am
+++ nano-1.3.1/src/Makefile.am
@@ -1,7 +1,7 @@
DEFS= -DSYSCONFDIR=\"$(sysconfdir)\"
localedir = $(datadir)/locale
-INCLUDES = -Iintl -DLOCALEDIR=\"$(localedir)\" -I@includedir@
+INCLUDES = -Iintl -DLOCALEDIR=\"$(localedir)\"
ACLOCAL_AMFLAGS = -I m4
--- nano-1.2.2.orig/Makefile.am
+++ nano-1.2.2/Makefile.am
@@ -31,6 +31,6 @@ EXTRA_DIST = ABOUT-NLS AUTHORS BUGS COPY
SUBDIRS = po m4
localedir = $(datadir)/locale
-INCLUDES = -Iintl -DLOCALEDIR=\"$(localedir)\" -I@includedir@
+INCLUDES = -Iintl -DLOCALEDIR=\"$(localedir)\"
ACLOCAL_AMFLAGS = -I m4
python () {
# Allow version-specific checksums
flags = d.getVarFlags("SRC_URI_%s" % d.getVar("PV", True))
if flags:
for flag, value in flags.iteritems():
d.setVarFlag("SRC_URI", flag, value)
}
DESCRIPTION = "GNU nano (Nano's ANOther editor, or \
Not ANOther editor) is an enhanced clone of the \
Pico text editor."
HOMEPAGE = "http://www.nano-editor.org/"
LICENSE = "GPLv2"
SECTION = "console/utils"
DEPENDS = "ncurses"
BRANCH = "${@'.'.join('${PV}'.split('.')[:2])}"
SRC_URI = "http://www.nano-editor.org/dist/v${BRANCH}/nano-${PV}.tar.gz \
file://m4/"
INC_PR = "r1"
BBCLASSEXTEND = "native"
inherit autotools
# only 16K more to get everything but the kitchen sink
EXTRA_OECONF = "--enable-all"
do_configure_prepend () {
install -d ${S}/m4
for m4 in ${WORKDIR}/m4/*.m4; do
install -m 0644 $m4 ${S}/m4/`basename $m4`
done
}
MIRRORS_prepend () {
http://www.nano-editor.org/dist/v${BPV}/ ${GNU_MIRROR}/nano/
}
require nano.inc
require checksums.inc
PR = "${INC_PR}.0"
BBVERSIONS = "1.0.[0-6]"
SRC_URI_append = " \
file://makefile.patch;patch=1 \
file://configure.patch;patch=1 \
"
EXTRA_AUTORECONF += "-I ${S}/m4"
require nano.inc
require checksums.inc
PR = "${INC_PR}.0"
BBVERSIONS = "1.0.[7-9]"
SRC_URI_append = " \
file://makefile.patch;patch=1 \
file://aclocal.patch;patch=1 \
"
require nano.inc
require checksums.inc
PR = "${INC_PR}.1"
BBVERSIONS = "1.2.[0-5]"
SRC_URI_append = " \
file://makefile.patch;patch=1 \
file://configure.patch;patch=1 \
"
require nano.inc
require checksums.inc
PR = "${INC_PR}.0"
BBVERSIONS = "1.3.[1-12]"
SRC_URI_append = " \
file://makefile.patch;patch=1 \
file://configure.patch;patch=1 \
"
require nano.inc
require checksums.inc
PR = "${INC_PR}.0"
BBVERSIONS = "2.0.[0-9] \
2.1.[0-11] \
2.2.[0-3]"
# Search path for a program which passes the given test.
# Ulrich Drepper <[email protected]>, 1996.
#
# This file can be copied and used freely without restrictions. It can
# be used in projects which are not available under the GNU Public License
# but which still want to provide support for the GNU gettext functionality.
# Please note that the actual code is *not* freely available.
# serial 1
dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
AC_DEFUN(NANO_AM_PATH_PROG_WITH_TEST,
[# Extract the first word of "$2", so it can be a program name with args.
set dummy $2; ac_word=[$]2
AC_MSG_CHECKING([for $ac_word])
AC_CACHE_VAL(ac_cv_path_$1,
[case "[$]$1" in
/*)
ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
;;
*)
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
for ac_dir in ifelse([$5], , $PATH, [$5]); do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
if [$3]; then
ac_cv_path_$1="$ac_dir/$ac_word"
break
fi
fi
done
IFS="$ac_save_ifs"
dnl If no 4th arg is given, leave the cache variable unset,
dnl so AC_PATH_PROGS will keep looking.
ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
])dnl
;;
esac])dnl
$1="$ac_cv_path_$1"
if test -n "[$]$1"; then
AC_MSG_RESULT([$]$1)
else
AC_MSG_RESULT(no)
fi
AC_SUBST($1)dnl
])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment