Fossil SCM

Make sure -ldl is appended after -lcrypto; Fixes link errors with static build.

ashepilko 2018-07-12 06:46 trunk
Commit efbc319c32a38fab4df9bcce655bca77123ff7ea8ead6d52e006f1bf84c067ba
1 file changed +6 -1
+6 -1
--- auto.def
+++ auto.def
@@ -495,11 +495,10 @@
495495
# Check for getpassphrase() for Solaris 10 where getpass() truncates to 10 chars
496496
if {![cc-check-functions getpassphrase]} {
497497
# Haiku needs this
498498
cc-check-function-in-lib getpass bsd
499499
}
500
-cc-check-function-in-lib dlopen dl
501500
cc-check-function-in-lib sin m
502501
503502
# Check for the FuseFS library
504503
if {[opt-bool fusefs]} {
505504
if {[cc-check-function-in-lib fuse_mount fuse]} {
@@ -507,8 +506,14 @@
507506
define FOSSIL_HAVE_FUSEFS 1
508507
define-append LIBS -lfuse
509508
msg-result "FuseFS support enabled"
510509
}
511510
}
511
+
512
+# Finally, append -ldl to make sure it's the last in the list.
513
+# The library order matters in case of static linking.
514
+if {[check-function-in-lib dlopen dl]} {
515
+ define-append LIBS -ldl
516
+}
512517
513518
make-template Makefile.in
514519
make-config-header autoconfig.h -auto {USE_* FOSSIL_*}
515520
--- auto.def
+++ auto.def
@@ -495,11 +495,10 @@
495 # Check for getpassphrase() for Solaris 10 where getpass() truncates to 10 chars
496 if {![cc-check-functions getpassphrase]} {
497 # Haiku needs this
498 cc-check-function-in-lib getpass bsd
499 }
500 cc-check-function-in-lib dlopen dl
501 cc-check-function-in-lib sin m
502
503 # Check for the FuseFS library
504 if {[opt-bool fusefs]} {
505 if {[cc-check-function-in-lib fuse_mount fuse]} {
@@ -507,8 +506,14 @@
507 define FOSSIL_HAVE_FUSEFS 1
508 define-append LIBS -lfuse
509 msg-result "FuseFS support enabled"
510 }
511 }
 
 
 
 
 
 
512
513 make-template Makefile.in
514 make-config-header autoconfig.h -auto {USE_* FOSSIL_*}
515
--- auto.def
+++ auto.def
@@ -495,11 +495,10 @@
495 # Check for getpassphrase() for Solaris 10 where getpass() truncates to 10 chars
496 if {![cc-check-functions getpassphrase]} {
497 # Haiku needs this
498 cc-check-function-in-lib getpass bsd
499 }
 
500 cc-check-function-in-lib sin m
501
502 # Check for the FuseFS library
503 if {[opt-bool fusefs]} {
504 if {[cc-check-function-in-lib fuse_mount fuse]} {
@@ -507,8 +506,14 @@
506 define FOSSIL_HAVE_FUSEFS 1
507 define-append LIBS -lfuse
508 msg-result "FuseFS support enabled"
509 }
510 }
511
512 # Finally, append -ldl to make sure it's the last in the list.
513 # The library order matters in case of static linking.
514 if {[check-function-in-lib dlopen dl]} {
515 define-append LIBS -ldl
516 }
517
518 make-template Makefile.in
519 make-config-header autoconfig.h -auto {USE_* FOSSIL_*}
520

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button