diff --git a/Makefile b/Makefile index fe5f8c6..87e0937 100644 --- a/Makefile +++ b/Makefile @@ -22,7 +22,7 @@ LOBJS = src/nameinfo.o src/version.o \ GENH = src/version.h -CFLAGS += -Wall -O0 -g -std=c99 -D_GNU_SOURCE -pipe +CFLAGS += -Wall -O0 -g -std=c99 -pipe NO_AS_NEEDED = -Wl,--no-as-needed LIBDL = -ldl LDFLAGS = -fPIC $(NO_AS_NEEDED) $(LIBDL) -lpthread diff --git a/configure b/configure index ea7fe2c..0ec6e91 100755 --- a/configure +++ b/configure @@ -142,6 +142,9 @@ if [ -z "$CC" ] ; then CC=cc fi +check_compile "whether fine to define _GNU_SOURCE" "-D_GNU_SOURCE" \ +'#include \nint main() { return 0; }' + for i in 700 600; do check_compile "whether _XOPEN_SOURCE=$i is suitable for C99 mode" "-D_XOPEN_SOURCE=$i" "#include " && break done