Skip to content

Instantly share code, notes, and snippets.

@zmwangx
Created February 5, 2017 00:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zmwangx/642a4acc94da8f487d7e3cacd2b12f98 to your computer and use it in GitHub Desktop.
Save zmwangx/642a4acc94da8f487d7e3cacd2b12f98 to your computer and use it in GitHub Desktop.
dummy gnulib project used for investigating Wget bug #50223 https://savannah.gnu.org/bugs/?50223

A dummy gnulib project using the same set of modules as wget, as part of the investigation of Wget bug #50223.

Run bootstrap-and-configure, and one should expect to see

==> grep LIBUNISTRING= config.log
HAVE_LIBUNISTRING='yes'
LIBUNISTRING='-L/usr/local/lib -lunistring'
LTLIBUNISTRING='-L/usr/local/lib -lunistring -R/usr/local/lib'

at the end. However, in the case of Wget, we get

$ grep LIBUNISTRING= config.log
HAVE_LIBUNISTRING='yes'
LIBUNISTRING=''
LTLIBUNISTRING=''

on macOS 10.12.3 with libunistring 0.9.7 installed via Homebrew.

#!/bin/sh
gnulib_modules=(
accept
alloca
announce-gen
base32
bind
c-ctype
c-strcase
c-strcasestr
clock-time
close
connect
dirname
fcntl
flock
fnmatch
fopen
futimens
ftello
getaddrinfo
getline
getopt-gnu
getpass-gnu
getpeername
getsockname
gettext
gitlog-to-changelog
git-version-gen
gnupload
hostent
ioctl
iconv
iconv-h
inet_ntop
intprops
inttypes
langinfo
limits-h
link
listen
maintainer-makefile
mbiter
mbtowc
memrchr
mkdir
mkstemp
mkostemp
nanosleep
crypto/md2
crypto/md4
crypto/md5
crypto/sha1
crypto/sha256
crypto/sha512
open
pipe-posix
posix_spawn
quote
quotearg
recv
regex
'select'
send
setsockopt
signal-h
sigprocmask
sigpipe
snprintf
socket
spawn-pipe
stat
stdbool
stdint
strcase
strerror_r-posix
strpbrk
strptime
strtok_r
strtoll
symlink
sys_types
timegm
tmpdir
unlink
unlocked-io
update-copyright
libunistring-optional
unistr/u8-strlen
unicase/u8-tolower
utimens
vasprintf
vsnprintf
wcwidth
write
xmemdup0
xstrndup
)
[ -d gnulib ] || git clone --depth 1 git://git.sv.gnu.org/gnulib.git
gnulib/gnulib-tool --import "${gnulib_modules[@]}"
autoreconf -fvi
./configure
echo $'\e[34;1m'"==> grep LIBUNISTRING= config.log"$'\e[0m' >&2
grep LIBUNISTRING= config.log
AC_INIT([gnulib-test], [1.0])
AM_INIT_AUTOMAKE([foreign])
AC_PROG_CC
gl_EARLY
gl_INIT
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([
Makefile
lib/Makefile
])
AC_OUTPUT
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = lib
EXTRA_DIST = m4/gnulib-cache.m4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment