-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
First round of changes from Dennis Schridde <devurandom@gmx.net>, imp…
…roving the use of autoconf & starting towards Win32 support.
- Loading branch information
Showing
9 changed files
with
187 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
AC_DEFUN([AC_C_COMPILE_FLAGS],[ | ||
AC_DEFUN([X_C_COMPILE_FLAGS],[ | ||
NEW_CFLAGS="$CFLAGS" | ||
for ac_flag in $1 | ||
do | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
# Process this file with autoconf to produce a configure script. | ||
|
||
AC_INIT([zsync],[0.6],[http://zsync.moria.org.uk/]) | ||
|
||
AC_CONFIG_SRCDIR([client.c]) | ||
AC_CONFIG_AUX_DIR([autotools]) | ||
AC_CONFIG_MACRO_DIR([autotools]) | ||
|
||
AC_CANONICAL_HOST | ||
|
||
AM_INIT_AUTOMAKE([dist-bzip2 no-dist-gzip foreign check-news -Woverride -Wobsolete -Wportability -Wsyntax -Wunsupported]) | ||
AM_MAINTAINER_MODE | ||
|
||
dnl --- Check for programs | ||
AC_PROG_CC | ||
AC_PROG_LN_S | ||
AC_PROG_RANLIB | ||
|
||
AC_ARG_ENABLE([profile], | ||
AS_HELP_STRING([--enable-profile],[Turns on profiling]), | ||
[ ZS_CFLAGS="${ZS_CFLAGS} -pg" ]) | ||
|
||
dnl --- Header files, typedefs, structures, libraries | ||
AC_C_CONST | ||
AC_HEADER_STDC | ||
# string.h, memory.h, stdlib.h both included in the default header checks | ||
# but we do need to give at least one .h to test, or Solaris sh errors | ||
AC_CHECK_HEADERS([string.h]) | ||
AC_TYPE_SIZE_T | ||
AC_CHECK_FUNCS(memcpy pwrite pread mkstemp) | ||
|
||
X_TYPE_SOCKLEN_T | ||
X_TYPE_IN_PORT_T | ||
X_DECL_H_ERRNO | ||
|
||
dnl Solaris needs -lsocket - and we need this for the getaddrinfo test | ||
AC_CHECK_LIB(socket,socket) | ||
|
||
AC_REPLACE_FUNCS(getaddrinfo) | ||
|
||
dnl - Large file support if available | ||
AC_SYS_LARGEFILE | ||
AC_FUNC_FSEEKO | ||
AC_CHECK_SIZEOF(size_t) | ||
AC_CHECK_SIZEOF(off_t) | ||
|
||
AM_WITH_DMALLOC | ||
AH_BOTTOM([ | ||
#ifdef WITH_DMALLOC | ||
# include <dmalloc.h> | ||
#endif | ||
]) | ||
|
||
case $host_os in | ||
mingw32) | ||
host_os_mingw32=yes | ||
LIBS="${LIBS} -lwsock32" | ||
;; | ||
*) | ||
AC_DEFINE([_XOPEN_SOURCE], 600, [Enable POSIX extensions if present]) | ||
AC_DEFINE([_BSD_SOURCE],1, [Enable BSD extensions if present]) | ||
;; | ||
esac | ||
AM_CONDITIONAL([MINGW32], test "x$host_os_mingw32" = "xyes") | ||
|
||
X_C_COMPILE_FLAGS($ZS_CFLAGS -g -Wall -Wwrite-strings -Winline -Wextra -Winline -Wmissing-noreturn -Wredundant-decls -Wnested-externs -Wundef -Wbad-function-cast -Wcast-align -Wvolatile-register-var -ffast-math) | ||
|
||
dnl --- output | ||
AC_SUBST(ac_aux_dir) | ||
AC_CONFIG_HEADERS([config.h]) | ||
AC_CONFIG_FILES([Makefile librcksum/Makefile zlib/Makefile libzsync/Makefile doc/Makefile]) | ||
AC_OUTPUT | ||
|
Oops, something went wrong.