1
0
forked from bip/bip

Reformatting

This commit is contained in:
Pierre-Louis Bonicoli 2015-07-10 11:49:30 +02:00
parent ddf7958353
commit 9df25a6423

View File

@ -1,5 +1,7 @@
AC_PREREQ([2.69])
AC_INIT([Bip Sexy IRC Proxy], [0.8.9-git], [http://bip.milkypond.org/projects/bip/activity], [bip], [http://bip.milkypond.org/])
AC_INIT([Bip Sexy IRC Proxy], [0.8.9-git],
[http://bip.milkypond.org/projects/bip/activity], [bip],
[http://bip.milkypond.org/])
AM_INIT_AUTOMAKE([subdir-objects])
AM_MAINTAINER_MODE
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES])
@ -12,7 +14,8 @@ AM_PROG_CC_C_O
AC_PROG_INSTALL
AM_PROG_LEX
AC_PROG_YACC
# AC_PROG_YACC falls back to YACC = "yacc" if bison or byacc are not found, but it does not mean it is present
# AC_PROG_YACC falls back to YACC = "yacc" if bison or byacc are not found,
# but it does not mean it is present
AS_IF([test x"$YACC" = "xyacc"], [
AC_CHECK_PROG([YACC_EXISTS], [yacc], [yes], [no])
AS_IF([test x"$YACC_EXISTS" != xyes], [
@ -22,7 +25,9 @@ AS_IF([test x"$YACC" = "xyacc"], [
# Checks for header files.
AC_FUNC_ALLOCA
AC_CHECK_HEADERS([arpa/inet.h fcntl.h inttypes.h libintl.h limits.h malloc.h netdb.h netinet/in.h stddef.h stdint.h stdlib.h string.h sys/socket.h sys/time.h termios.h unistd.h])
AC_CHECK_HEADERS([arpa/inet.h fcntl.h inttypes.h libintl.h limits.h malloc.h \
netdb.h netinet/in.h stddef.h stdint.h stdlib.h string.h \
sys/socket.h sys/time.h termios.h unistd.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_C_INLINE
@ -50,14 +55,19 @@ AC_FUNC_FORK
AC_FUNC_MALLOC
AC_FUNC_MKTIME
AC_FUNC_REALLOC
AC_CHECK_FUNCS([ftruncate gethostname gettimeofday localtime_r memmove memset mkdir select socket strcasecmp strchr strcspn strdup strerror strrchr strstr])
AC_CHECK_FUNCS(ftruncate gethostname gettimeofday localtime_r memmove memset)
AC_CHECK_FUNCS(mkdir select socket strcasecmp strchr strcspn strdup strerror)
AC_CHECK_FUNCS(strrchr strstr)
# Deal with parameters
AC_ARG_ENABLE([debug], AS_HELP_STRING([--enable-debug], [Enable debug build]))
AC_ARG_WITH([openssl], AS_HELP_STRING([--without-openssl], [Disable SSL using OpenSSL]))
AC_ARG_ENABLE([oidentd], AS_HELP_STRING([--enable-oidentd], [Enable oidentd support (bip overwrites ~/.oidentd.conf with this on!)]))
AC_ARG_ENABLE([pie], AS_HELP_STRING([--disable-pie], [Do not build a position independent executable]))
AC_ARG_WITH([openssl], AS_HELP_STRING([--without-openssl],
[Disable SSL using OpenSSL]))
AC_ARG_ENABLE([oidentd], AS_HELP_STRING([--enable-oidentd],
[Enable oidentd support (bip overwrites ~/.oidentd.conf with this on!)]))
AC_ARG_ENABLE([pie], AS_HELP_STRING([--disable-pie],
[Do not build a position independent executable]))
AM_CONDITIONAL(DEBUG, test x$enable_debug = xyes)
AS_IF([test "x$enable_debug" = "xyes"], [
@ -81,7 +91,7 @@ AS_IF([test "x$with_openssl" != "xno"], [
AC_CHECK_LIB(crypto, CRYPTO_new_ex_data, [], [
AC_MSG_ERROR([library 'crypto' is required for OpenSSL support])
with_openssl=no
], -lcrypto)
], -lcrypto)
AC_CHECK_LIB(ssl, SSL_read, [], [
AC_MSG_ERROR([library 'ssl' is required for OpenSSL support])
with_openssl=no
@ -100,15 +110,15 @@ AS_IF([test "x$enable_pie" != "xno"], [
[ap_cv_cc_pie=yes],
[ap_cv_cc_pie=no],
[ap_cv_cc_pie=yes]
)
CFLAGS=$save_CFLAGS
LDFLAGS=$save_LDFLAGS
])
if test "$ap_cv_cc_pie" = "yes"; then
CFLAGS="$CFLAGS -fPIE"
LDFLAGS="$LDFLAGS -pie"
)
CFLAGS=$save_CFLAGS
LDFLAGS=$save_LDFLAGS
])
if test "$ap_cv_cc_pie" = "yes"; then
CFLAGS="$CFLAGS -fPIE"
LDFLAGS="$LDFLAGS -pie"
enable_pie=yes
fi
fi
])
AC_CONFIG_FILES([Makefile])
@ -120,4 +130,3 @@ echo OPENSSL: yes
echo DEBUG: $enable_debug $backtrace
echo OIDENTD: $enable_oidentd
echo PIE: $enable_pie