Skip to content

Commit

Permalink
* SunOS / Solaris compilation fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dave committed Jul 8, 2008
1 parent deb5f9b commit b19fa66
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
11 changes: 6 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@ MANDIR=/usr/local/man
# __BSD_VISIBLE is for FreeBSD AF_* constants
# _ALL_SOURCE is for AIX 5.3 LOG_PERROR constant
#
NAME=cntlm
CC=gcc
VER=`cat VERSION`
OBJS=utils.o ntlm.o xcrypt.o config.o socket.o acl.o auth.o http.o proxy.o
CFLAGS=$(FLAGS) -std=c99 -Wall -pedantic -O3 -D__BSD_VISIBLE -D_ALL_SOURCE -D_XOPEN_SOURCE=600 -D_POSIX_C_SOURCE=200112 -D_ISOC99_SOURCE -D_REENTRANT -DVERSION=\"`cat VERSION`\"
LDFLAGS=-lpthread
NAME=cntlm
VER=`cat VERSION`
DIR=`pwd`
OS=$(shell uname -s)
OSLDFLAGS=$(shell [ $(OS) = "SunOS" ] && echo "-lrt -lsocket -lnsl")
LDFLAGS:=-lpthread $(OSLDFLAGS)

$(NAME): configure-stamp $(OBJS)
@echo "Linking $@"
Expand Down Expand Up @@ -61,7 +62,7 @@ rpm:
tgz:
mkdir -p tmp
rm -f tmp/$(NAME)-$(VER)
ln -s $(DIR) tmp/$(NAME)-$(VER)
ln -s $(PWD) tmp/$(NAME)-$(VER)
sed "s/^\./$(NAME)-$(VER)/" doc/files.txt | tar zchf $(NAME)-$(VER).tar.gz --no-recursion -C tmp -T -
rm tmp/$(NAME)-$(VER)
rmdir tmp 2>/dev/null || true
Expand Down
6 changes: 3 additions & 3 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
#
# To prevent ugly Makefile extensions, underscore and chars following it
# in the name XXX are automatically removed before locating relevant
# Makefile. This is why compiler "xlc_r" has automatic Makefile extension
# just "xlc". This can be disabled if neccessary.
# Makefile. This is why compiler "xlc_r" has Makefile extension "xlc".
# This can be disabled if neccessary.
#

CCS="xlc_r gcc"
Expand All @@ -16,7 +16,7 @@ CCS="xlc_r gcc"
# Look for supported compilers
#
for c in $CCS; do
if CCPATH=`which $c 2>&1`; then
if CCPATH=`which $c 2>&1` && [ `expr substr "$CCPATH" 1 1` = "/" ]; then
CC="$c"
break
fi
Expand Down

0 comments on commit b19fa66

Please sign in to comment.