From: michael Date: Mon, 22 Dec 2014 13:36:06 +0000 (+0000) Subject: - Move configure.in to configure.ac X-Git-Tag: 1.0.0beta1~80 X-Git-Url: http://git.serene-ircd.net/?a=commitdiff_plain;h=0b0b7c7b56af13607ed818f4129b81bf73b79739;p=hopm.git - Move configure.in to configure.ac git-svn-id: svn://svn.ircd-hybrid.org/svnroot/hopm/trunk@5058 82007160-df01-0410-b94d-b575c5fd34c7 --- diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..18a4214 --- /dev/null +++ b/configure.ac @@ -0,0 +1,120 @@ +dnl Process this file with autoconf to produce a configure script. +AC_INIT(bopm, [3.1.3]) +AC_CONFIG_SRCDIR(src/opercmd.h) +AM_CONFIG_HEADER(src/setup.h) +AM_INIT_AUTOMAKE() +AC_PREFIX_DEFAULT([\${HOME}/bopm]) +AM_MAINTAINER_MODE + +AC_ARG_WITH(extra-fascism, + AC_HELP_STRING([--with-extra-fascism], + [Add extra gcc3-specific warning flags]), + [CFLAGS="$CFLAGS -g -O0 -W -Wall -Wfloat-equal -Wbad-function-cast -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wnested-externs"]) + +dnl ipv6? +dnl AC_ARG_ENABLE(ipv6, +dnl AC_HELP_STRING([--enable-ipv6], [Enable IPV6 support]), +dnl [ac_cv_ipv6=$enableval], [ac_cv_ipv6="no"]) + +dnl AC_MSG_CHECKING([whether to enable IPv6 features]) + +dnl if test "$ac_cv_ipv6" = "yes" ; then +dnl AC_DEFINE(IPV6, 1, [Use Ipv6 Support]) +dnl AC_MSG_RESULT([yes]) +dnl else +dnl AC_MSG_RESULT([no]) +dnl fi + +dnl Checks for programs. +AC_PROG_CC +AC_PROG_LIBTOOL + +dnl Checks for libraries. + +dnl Checks for header files. +AC_HEADER_STDC + +AC_CHECK_HEADERS(sys/poll.h, have_poll_sys_h=yes, have_sys_poll_h=no) + +AC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h strings.h) + +dnl Checks for typedefs, structures, and compiler characteristics. +AC_C_CONST +AC_TYPE_SIZE_T +AC_HEADER_TIME +AC_STRUCT_TM + +dnl Checks for library functions. +AC_TYPE_SIGNAL +AC_FUNC_STRFTIME + +AC_FUNC_SNPRINTF + +dnl check for yacc +AC_PROG_INSTALL +AC_PROG_YACC + +dnl check for lexx +AM_PROG_LEX + +dnl check if we need -lsocket or -lnsl +ETR_SOCKET_NSL + +AC_CHECK_FUNCS(inet_aton inet_pton socket strdup strstr) + +dnl Check if we can use gethostbyname2 for ipv6 +AC_CHECK_FUNCS(gethostbyname gethostbyname2) + +dnl AIX fun +AC_C_BIGENDIAN + +AC_CHECK_SIZEOF(int) +AC_CHECK_SIZEOF(short) +AC_CHECK_SIZEOF(long) + + +dnl teehee - taken from MRTG / Tobias Oetiker +dnl echo $ECHO_N "checking for POSIX-compliant goat $ECHO_C" +dnl for bleh in 1 2 3; do +dnl echo $ECHO_N "." +dnl sleep 1 +dnl done +dnl AC_MSG_RESULT([ http://www.blitzed.org/goat_winter_2001.phtml]) + +AH_BOTTOM([ +#if SIZEOF_INT==4 +typedef signed int int32; +typedef unsigned int uint32; +#elif SIZEOF_LONG==4 +typedef signed long int32; +typedef unsigned long uint32; +#else +# error "No 32-bit integer type!" +#endif + +#if SIZEOF_SHORT!=2 +# error "Your short int data type is not 2 bytes: firedns is not going to work for you. mail bopm@lists.blitzed.org!" +#endif +]) + +AC_CONFIG_SUBDIRS(src/libopm) + +dnl This comes last because configure won't actually work with -Werror in +dnl the CFLAGS +AC_ARG_WITH(werror, + AC_HELP_STRING([--with-werror], + [use -Werror to abort compilation on any warning]), + [CFLAGS="$CFLAGS -Werror"]) + +AC_OUTPUT(Makefile src/Makefile) + + +echo "##############################################################################" +echo "Everything is now configured, but you can find some more (infrequently" +echo "changed) options in options.h. To compile BOPM now, just type make. It" +echo "requires GNU Make, which may be installed as gmake on your system." +echo +echo "bopm will be installed in ${prefix}. To change this, run:" +echo " ./configure --prefix=DIRECTORY" +echo "##############################################################################" +echo diff --git a/configure.in b/configure.in deleted file mode 100644 index 18a4214..0000000 --- a/configure.in +++ /dev/null @@ -1,120 +0,0 @@ -dnl Process this file with autoconf to produce a configure script. -AC_INIT(bopm, [3.1.3]) -AC_CONFIG_SRCDIR(src/opercmd.h) -AM_CONFIG_HEADER(src/setup.h) -AM_INIT_AUTOMAKE() -AC_PREFIX_DEFAULT([\${HOME}/bopm]) -AM_MAINTAINER_MODE - -AC_ARG_WITH(extra-fascism, - AC_HELP_STRING([--with-extra-fascism], - [Add extra gcc3-specific warning flags]), - [CFLAGS="$CFLAGS -g -O0 -W -Wall -Wfloat-equal -Wbad-function-cast -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wnested-externs"]) - -dnl ipv6? -dnl AC_ARG_ENABLE(ipv6, -dnl AC_HELP_STRING([--enable-ipv6], [Enable IPV6 support]), -dnl [ac_cv_ipv6=$enableval], [ac_cv_ipv6="no"]) - -dnl AC_MSG_CHECKING([whether to enable IPv6 features]) - -dnl if test "$ac_cv_ipv6" = "yes" ; then -dnl AC_DEFINE(IPV6, 1, [Use Ipv6 Support]) -dnl AC_MSG_RESULT([yes]) -dnl else -dnl AC_MSG_RESULT([no]) -dnl fi - -dnl Checks for programs. -AC_PROG_CC -AC_PROG_LIBTOOL - -dnl Checks for libraries. - -dnl Checks for header files. -AC_HEADER_STDC - -AC_CHECK_HEADERS(sys/poll.h, have_poll_sys_h=yes, have_sys_poll_h=no) - -AC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h strings.h) - -dnl Checks for typedefs, structures, and compiler characteristics. -AC_C_CONST -AC_TYPE_SIZE_T -AC_HEADER_TIME -AC_STRUCT_TM - -dnl Checks for library functions. -AC_TYPE_SIGNAL -AC_FUNC_STRFTIME - -AC_FUNC_SNPRINTF - -dnl check for yacc -AC_PROG_INSTALL -AC_PROG_YACC - -dnl check for lexx -AM_PROG_LEX - -dnl check if we need -lsocket or -lnsl -ETR_SOCKET_NSL - -AC_CHECK_FUNCS(inet_aton inet_pton socket strdup strstr) - -dnl Check if we can use gethostbyname2 for ipv6 -AC_CHECK_FUNCS(gethostbyname gethostbyname2) - -dnl AIX fun -AC_C_BIGENDIAN - -AC_CHECK_SIZEOF(int) -AC_CHECK_SIZEOF(short) -AC_CHECK_SIZEOF(long) - - -dnl teehee - taken from MRTG / Tobias Oetiker -dnl echo $ECHO_N "checking for POSIX-compliant goat $ECHO_C" -dnl for bleh in 1 2 3; do -dnl echo $ECHO_N "." -dnl sleep 1 -dnl done -dnl AC_MSG_RESULT([ http://www.blitzed.org/goat_winter_2001.phtml]) - -AH_BOTTOM([ -#if SIZEOF_INT==4 -typedef signed int int32; -typedef unsigned int uint32; -#elif SIZEOF_LONG==4 -typedef signed long int32; -typedef unsigned long uint32; -#else -# error "No 32-bit integer type!" -#endif - -#if SIZEOF_SHORT!=2 -# error "Your short int data type is not 2 bytes: firedns is not going to work for you. mail bopm@lists.blitzed.org!" -#endif -]) - -AC_CONFIG_SUBDIRS(src/libopm) - -dnl This comes last because configure won't actually work with -Werror in -dnl the CFLAGS -AC_ARG_WITH(werror, - AC_HELP_STRING([--with-werror], - [use -Werror to abort compilation on any warning]), - [CFLAGS="$CFLAGS -Werror"]) - -AC_OUTPUT(Makefile src/Makefile) - - -echo "##############################################################################" -echo "Everything is now configured, but you can find some more (infrequently" -echo "changed) options in options.h. To compile BOPM now, just type make. It" -echo "requires GNU Make, which may be installed as gmake on your system." -echo -echo "bopm will be installed in ${prefix}. To change this, run:" -echo " ./configure --prefix=DIRECTORY" -echo "##############################################################################" -echo diff --git a/src/libopm/configure.ac b/src/libopm/configure.ac new file mode 100644 index 0000000..d3ee682 --- /dev/null +++ b/src/libopm/configure.ac @@ -0,0 +1,101 @@ +dnl Process this file with autoconf to produce a configure script. +AC_INIT(libopm, [0.1]) +AC_CONFIG_SRCDIR(src/libopm.h) +AM_CONFIG_HEADER(src/setup.h) +AM_INIT_AUTOMAKE() +AC_PREFIX_DEFAULT([/usr/local/libopm]) +AM_MAINTAINER_MODE + +# for documentation purposes +DOX_DIR_HTML=api +DOX_DIR_LATEX=latex +DOX_DIR_MAN=man + +AC_SUBST(DOX_DIR_HTML) +AC_SUBST(DOX_DIR_LATEX) +AC_SUBST(DOX_DIR_MAN) + +AC_ARG_WITH(extra-fascism, + AC_HELP_STRING([--with-extra-fascism], + [add extra gcc3-specific warning flags]), + [CFLAGS="$CFLAGS -g -O0 -W -Wall -Wfloat-equal -Wbad-function-cast -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wnested-externs"]) + +dnl AC_ARG_WITH(faldo, +dnl AC_HELP_STRING([--with-faldo], +dnl [make some use of Nick Faldo])) + +dnl Checks for programs. +AC_PROG_CC +AC_PROG_LIBTOOL +AC_SUBST(LIBTOOL_DEPS) + +dnl check if we need -lsocket or -lnsl +ETR_SOCKET_NSL + +dnl Checks for header files. +AC_HEADER_STDC + +AC_CHECK_HEADERS(sys/poll.h, have_poll_sys_h=yes, have_sys_poll_h=no) + +AC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h strings.h) + +dnl Checks for typedefs, structures, and compiler characteristics. +AC_C_CONST +AC_TYPE_SIZE_T +AC_HEADER_TIME + +AC_FUNC_SNPRINTF + +dnl if they want select() or they don't have poll() then we need to check +dnl that we actually have select() +if test "$have_sys_poll_h" = "no"; then + AC_CHECK_FUNCS(select, have_select=yes, have_select=no) + if test "$have_select" = "no"; then + AC_MSG_ERROR([No select() implementation found]) + fi +fi + +AC_CHECK_FUNCS(inet_aton inet_pton) + +dnl Check if we can use gethostbyname2 for ipv6 +AC_CHECK_FUNCS(gethostbyname gethostbyname2) + +dnl AIX fun +AC_C_BIGENDIAN + +dnl Solaris has to be weird doesn't it... +AC_CHECK_LIB(socket, socket, AC_SUBST(LSOCKET, [-lsocket])) +AC_CHECK_LIB(nsl, gethostbyname, AC_SUBST(LNSL, [-lnsl])) + +dnl teehee - taken from MRTG / Tobias Oetiker +dnl if test "$with_faldo" != "no"; then +dnl echo $ECHO_N "checking for Nick Faldo $ECHO_C" +dnl for bleh in 1 2 3; do +dnl echo $ECHO_N "." +dnl sleep 1 +dnl done +dnl AC_MSG_RESULT([ http://blitzed.org/advocacy/enjoy.jpg]) +dnl fi + +LTLIBOBJS=`echo "$LIB@&t@OBJS" | + sed 's,\.[[^.]]* ,.lo ,g;s,\.[[^.]]*$,.lo,'` +AC_SUBST(LTLIBOBJS) + +dnl This comes last because configure won't actually work with -Werror in +dnl the CFLAGS +AC_ARG_WITH(werror, + AC_HELP_STRING([--with-werror], + [use -Werror to abort compilation on any warning]), + [CFLAGS="$CFLAGS -Werror"]) + +AC_OUTPUT(Makefile src/Makefile doc/Makefile doc/Doxyfile) + +echo "##############################################################################" +echo "Everything is now configured. To compile libopm now, just type make. It" +echo "requires GNU Make, which may be installed as gmake on your system." +echo +echo "libopm will be installed in ${prefix}. To change this, run:" +echo " ./configure --prefix=DIRECTORY" +echo +echo "##############################################################################" +echo diff --git a/src/libopm/configure.in b/src/libopm/configure.in deleted file mode 100644 index d3ee682..0000000 --- a/src/libopm/configure.in +++ /dev/null @@ -1,101 +0,0 @@ -dnl Process this file with autoconf to produce a configure script. -AC_INIT(libopm, [0.1]) -AC_CONFIG_SRCDIR(src/libopm.h) -AM_CONFIG_HEADER(src/setup.h) -AM_INIT_AUTOMAKE() -AC_PREFIX_DEFAULT([/usr/local/libopm]) -AM_MAINTAINER_MODE - -# for documentation purposes -DOX_DIR_HTML=api -DOX_DIR_LATEX=latex -DOX_DIR_MAN=man - -AC_SUBST(DOX_DIR_HTML) -AC_SUBST(DOX_DIR_LATEX) -AC_SUBST(DOX_DIR_MAN) - -AC_ARG_WITH(extra-fascism, - AC_HELP_STRING([--with-extra-fascism], - [add extra gcc3-specific warning flags]), - [CFLAGS="$CFLAGS -g -O0 -W -Wall -Wfloat-equal -Wbad-function-cast -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wnested-externs"]) - -dnl AC_ARG_WITH(faldo, -dnl AC_HELP_STRING([--with-faldo], -dnl [make some use of Nick Faldo])) - -dnl Checks for programs. -AC_PROG_CC -AC_PROG_LIBTOOL -AC_SUBST(LIBTOOL_DEPS) - -dnl check if we need -lsocket or -lnsl -ETR_SOCKET_NSL - -dnl Checks for header files. -AC_HEADER_STDC - -AC_CHECK_HEADERS(sys/poll.h, have_poll_sys_h=yes, have_sys_poll_h=no) - -AC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h strings.h) - -dnl Checks for typedefs, structures, and compiler characteristics. -AC_C_CONST -AC_TYPE_SIZE_T -AC_HEADER_TIME - -AC_FUNC_SNPRINTF - -dnl if they want select() or they don't have poll() then we need to check -dnl that we actually have select() -if test "$have_sys_poll_h" = "no"; then - AC_CHECK_FUNCS(select, have_select=yes, have_select=no) - if test "$have_select" = "no"; then - AC_MSG_ERROR([No select() implementation found]) - fi -fi - -AC_CHECK_FUNCS(inet_aton inet_pton) - -dnl Check if we can use gethostbyname2 for ipv6 -AC_CHECK_FUNCS(gethostbyname gethostbyname2) - -dnl AIX fun -AC_C_BIGENDIAN - -dnl Solaris has to be weird doesn't it... -AC_CHECK_LIB(socket, socket, AC_SUBST(LSOCKET, [-lsocket])) -AC_CHECK_LIB(nsl, gethostbyname, AC_SUBST(LNSL, [-lnsl])) - -dnl teehee - taken from MRTG / Tobias Oetiker -dnl if test "$with_faldo" != "no"; then -dnl echo $ECHO_N "checking for Nick Faldo $ECHO_C" -dnl for bleh in 1 2 3; do -dnl echo $ECHO_N "." -dnl sleep 1 -dnl done -dnl AC_MSG_RESULT([ http://blitzed.org/advocacy/enjoy.jpg]) -dnl fi - -LTLIBOBJS=`echo "$LIB@&t@OBJS" | - sed 's,\.[[^.]]* ,.lo ,g;s,\.[[^.]]*$,.lo,'` -AC_SUBST(LTLIBOBJS) - -dnl This comes last because configure won't actually work with -Werror in -dnl the CFLAGS -AC_ARG_WITH(werror, - AC_HELP_STRING([--with-werror], - [use -Werror to abort compilation on any warning]), - [CFLAGS="$CFLAGS -Werror"]) - -AC_OUTPUT(Makefile src/Makefile doc/Makefile doc/Doxyfile) - -echo "##############################################################################" -echo "Everything is now configured. To compile libopm now, just type make. It" -echo "requires GNU Make, which may be installed as gmake on your system." -echo -echo "libopm will be installed in ${prefix}. To change this, run:" -echo " ./configure --prefix=DIRECTORY" -echo -echo "##############################################################################" -echo