(let ((dso-name (unix-name (car (output-files operation dso)))))
(unless (zerop
(run-shell-command
- #+sunos "gcc -shared -lresolv -lsocket -lnsl -o ~S ~{~S ~}"
- #-sunos "gcc -shared -o ~S ~{~S ~} "
+ "gcc ~A -o ~S ~{~S ~}"
+ (if (sb-ext:posix-getenv "LDFLAGS")
+ (sb-ext:posix-getenv "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"
+ (if (sb-ext:posix-getenv "CFLAGS")
+ (sb-ext:posix-getenv "CFLAGS")
+ "-fPIC")
(unix-name (car (output-files op c)))
(unix-name (component-pathname c))))
(error 'operation-error :operation op :component c)))
(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"))
(: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))))