Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/rofl0r/proxychains-ng.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrofl0r <rofl0r@users.noreply.github.com>2021-12-17 16:37:58 +0300
committerrofl0r <rofl0r@users.noreply.github.com>2021-12-17 16:37:58 +0300
commit4a963b2feb547cac5872a3299a85d86ecb9e7217 (patch)
tree81c751775bb2248bae841286a7a8f55eda4b8358
parente20c08fe47b743e250a220266f81b9de66a389d6 (diff)
only use -ldl if available (netbsd compilation fix)
fixes #416
-rw-r--r--Makefile1
-rwxr-xr-xconfigure5
2 files changed, 5 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 7483ffe..b191bf6 100644
--- a/Makefile
+++ b/Makefile
@@ -29,7 +29,6 @@ GENH = src/version.h
CFLAGS += -Wall -O0 -g -std=c99 -D_GNU_SOURCE -pipe
NO_AS_NEEDED = -Wl,--no-as-needed
-LIBDL = -ldl
LDFLAGS = -fPIC $(NO_AS_NEEDED) $(LIBDL) $(PTHREAD)
INC =
PIC = -fPIC
diff --git a/configure b/configure
index 0dc02da..4c8bcbc 100755
--- a/configure
+++ b/configure
@@ -234,6 +234,11 @@ fi
echo "$LD_SONAME_FLAG"
echo "LD_SET_SONAME = -Wl,$LD_SONAME_FLAG," >> config.mak
+if check_link "checking whether we can use -ldl" "-ldl" \
+"int main(){return 0;}" ; then
+echo "LIBDL = -ldl" >> config.mak
+fi
+
if check_link "checking whether we can use -lpthread" "-lpthread" \
"int main(){return 0;}" ; then
echo "PTHREAD = -lpthread" >> config.mak