0.8.6.14:
[sbcl.git] / contrib / sb-bsd-sockets / sb-bsd-sockets.asd
index 9fa49e5..fd251d6 100644 (file)
   (let ((dso-name (unix-name (car (output-files operation dso)))))
     (unless (zerop
             (run-shell-command
-             #+sunos "gcc -shared -lresolv -lsocket -lnsl -o ~S ~{~S ~}"
-             #+darwin "gcc -bundle -o ~S ~{~S ~}"
-             #-(or darwin sunos) "gcc -shared -o ~S ~{~S ~} "
+             "gcc ~A -o ~S ~{~S ~}"
+             (concatenate 'string
+                          (sb-ext:posix-getenv "EXTRA_LDFLAGS")
+                          " "
+                          #+sunos "-shared -lresolv -lsocket -lnsl"
+                          #+darwin "-bundle"
+                          #-(or darwin sunos) "-shared")
              dso-name
              (mapcar #'unix-name
                      (mapcan (lambda (c)
                  (component-pathname c))))
 (defmethod perform ((op compile-op) (c c-source-file))
   (unless
-      (= 0 (run-shell-command "gcc -fPIC -o ~S -c ~S"
+      (= 0 (run-shell-command "gcc ~A -o ~S -c ~S"
+                             (concatenate 'string
+                                          (sb-ext:posix-getenv "EXTRA_CFLAGS")
+                                          " "
+                                          "-fPIC")
                              (unix-name (car (output-files op c)))
                              (unix-name (component-pathname c))))
     (error 'operation-error :operation op :component c)))
@@ -64,6 +72,8 @@
 (defsystem sb-bsd-sockets
     :version "0.58"
     :depends-on (sb-grovel)
+    #+sb-building-contrib :pathname
+    #+sb-building-contrib "SYS:CONTRIB;SB-BSD-SOCKETS;"
     :components ((:file "defpackage")
                 (:file "split" :depends-on ("defpackage"))
                  (:file "array-data" :depends-on ("defpackage"))
@@ -74,7 +84,7 @@
                 (:file "foreign-glue" :depends-on ("defpackage" "malloc"))
                 (sb-grovel:grovel-constants-file
                  "constants"
-                 :package :sockint  :pathname "constants.lisp"
+                 :package :sockint
                  :depends-on  ("def-to-lisp" "defpackage" "foreign-glue"))
                 (:file "sockets"
                        :depends-on ("constants" "array-data"))
   (operate 'test-op 'sb-bsd-sockets-tests))
 
 (defsystem sb-bsd-sockets-tests
-  :depends-on (sb-rt sb-bsd-sockets)
+  :depends-on (sb-rt sb-bsd-sockets sb-posix)
   :components ((:file "tests")))
 
 (defmethod perform ((o test-op) (c (eql (find-system :sb-bsd-sockets-tests))))