Get native build working on Debian Linux

- now './autoconf && ./configure && make' will produce ./dna executable
 - added various missing libraries to configure.in
 - fixed nacl CFLAGS and LDFLAGS settings in configure.in
 - make git ignore autoconf and configure detritus
This commit is contained in:
Andrew Bettison 2012-04-03 10:33:21 +09:30
parent cad00beb5b
commit c31860986f
2 changed files with 11 additions and 3 deletions

8
.gitignore vendored
View File

@ -6,9 +6,13 @@
*.o
*.suo
.*.sw?
dna
configure
autom4te.cache
Makefile
config.log
config.status
nacl/nacl-20110221/build
nacl/naclinc.txt
nacl/nacllib.txt
serval.c
dna

View File

@ -14,9 +14,13 @@ echo " but fortunately it only needs to happen once.)"
cd nacl
./nacl-gcc-prep
cd ..
LDFLAGS="$LDFLAGS "`cat naclbuilddir.txt`"/libnacl.a"
CFLAGS="$CFLAGS -Inacl/"`cat nacl/naclinc.txt`
LDFLAGS="$LDFLAGS nacl/"`cat nacl/nacllib.txt`
AC_CHECK_LIB(m,sqrtf,[LDFLAGS="$LDFLAGS -lm"])
AC_CHECK_LIB(nsl,callrpc,[LDFLAGS="$LDFLAGS -lnsl"])
AC_CHECK_LIB(socket,socket,[LDFLAGS="$LDFLAGS -lsocket"])
AC_CHECK_LIB(dl,dlopen,[LDFLAGS="$LDFLAGS -ldl"])
AC_CHECK_LIB(pthread,pthread_create,[LDFLAGS="$LDFLAGS -lpthread"])
AC_OUTPUT(Makefile)