php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #56005 config.m4 doesn't work for FreeBSD
Submitted: 2004-03-16 02:25 UTC Modified: 2004-03-16 17:05 UTC
From: jon@php.net Assigned: jon (profile)
Status: Closed Package: xdiff (PECL)
PHP Version: 4CVS-2004-03-16 (stable) OS: FreeBSD 4.9-STABLE
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: jon@php.net
New email:
PHP Version: OS:

 

 [2004-03-16 02:25 UTC] jon@php.net
Description:
------------
FreeBSD doesn't have (or need) the dl library.  Linking against it unconditionally breaks the configure script.  The following patch corrects this for FreeBSD (and probably other platforms) while retaining -ldl for those platforms that require it.

Index: config.m4
===================================================================
RCS file: /repository/pecl/xdiff/config.m4,v
retrieving revision 1.2
diff -u -r1.2 config.m4
--- config.m4   8 Feb 2004 10:49:25 -0000       1.2
+++ config.m4   16 Mar 2004 06:23:02 -0000
@@ -28,6 +28,11 @@
 
   PHP_ADD_INCLUDE($XDIFF_DIR/include)
 
+  EXTRA_LIBS="-lm"
+  AC_CHECK_LIB(dl, dlopen, [
+    EXTRA_LIBS="$EXTRA_LIBS -ldl"
+  ])
+
   LIBNAME=xdiff 
   LIBSYMBOL=xdl_diff
 
@@ -38,7 +43,7 @@
   ],[
     AC_MSG_ERROR([wrong xdiff lib version or lib not found])
   ],[
-    -L$XDIFF_DIR/lib -lm -ldl
+    -L$XDIFF_DIR/lib $EXTRA_LIBS
   ])
   PHP_SUBST(XDIFF_SHARED_LIBADD)


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-03-16 17:05 UTC] jon@php.net
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Dec 27 15:01:29 2024 UTC