Commit c481ae3c authored by Seblu's avatar Seblu
Browse files

Add COPYING to dist

Change configure to new one, extract from sls
parent dbf5ac07
Loading
Loading
Loading
Loading

sld/trunk/COPYING

0 → 100644
+674 −0

File added.

Preview size limit exceeded, changes collapsed.

+2 −0
Original line number Diff line number Diff line
@@ -13,6 +13,8 @@ sld_SOURCES= src/sld.hh \

CLEANFILES= *~ '\#*' .*.swp .*~

EXTRA_DIST = COPYING README

.PHONY: tar re

tar: distcheck
+38 −51
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@
AC_PREREQ(2.59)

# Auto conf init
AC_INIT([sld],[1.0],[seblu@seblu.net],[sld])
AC_INIT([sld],[1.0],[contact@seblu.net],[sld])

# Define configure generator directory
AC_CONFIG_AUX_DIR([build])
@@ -13,65 +13,52 @@ AM_INIT_AUTOMAKE([foreign dist-bzip2 no-dist-gzip])
# Check platform
AC_CANONICAL_HOST

CXXFLAGS='-Wall -W -ansi -pedantic -D_XOPEN_SOURCE=600'

# Check for C++ compiler
AC_LANG([C++])
AC_PROG_CXX

# Check for Make
AC_PROG_MAKE_SET

# check for ranlib
AC_PROG_RANLIB
# without-error arg
AC_ARG_WITH([error],
  [AS_HELP_STRING([--without-error], [GCC warnings dont make compilation errors])],
  [],
  [with_error=yes]
)

# Check for lib efence
AC_CHECK_LIB([efence], [malloc], [EFENCELIB=-lefence])
AC_SUBST([EFENCELIB])
# with-debug arg
AC_ARG_WITH([debug],
  [AS_HELP_STRING([--with-debug], [Use -g and don't use neither -DNDEBUG nor -O3])],
  [],
  [with_debug=no]
)

# Checks for library functions.
# with-efence arg
AC_ARG_WITH([efence],
  [AS_HELP_STRING([--with-efence], [Link with Electric-Fence library])],
  [],
  [with_efence=no]
)

# Checks for typedefs, structures, and compiler characteristics.
# Default CXX Flags
CXXFLAGS='-Wall -W -ansi -pedantic -D_XOPEN_SOURCE=600 -pipe'

# Check for headers
# Set Error flags
AS_IF([test "x$with_error" != xno],[CXXFLAGS="$CXXFLAGS -Werror"])

dnl Memo:
dnl AC ARG WITH(package, help-string, [action-if-given], [action-if-not-given])
# Set Debug flags
AS_IF([test "x$with_debug" != xyes],[CXXFLAGS="$CXXFLAGS -DNDEBUG -O3"], [CXXFLAGS="$CXXFLAGS -g"])

# Check for C++ compiler
AC_LANG([C++])
AC_PROG_CXX

AC_ARG_WITH([noerror],
  [AS_HELP_STRING([--with-noerror], [Warning dont create compilation error])],
  [dnl action-if-given
       true
  ],
  [dnl action-if-not-given
       CXXFLAGS="$CXXFLAGS -Werror"
  ]
)
# Check for Make
AC_PROG_MAKE_SET

AC_ARG_WITH([debug],
  [AS_HELP_STRING([--with-debug], [use -g and don't use -DNDEBUG -O3])],
  [dnl action-if-given
       CXXFLAGS="$CXXFLAGS -g"
  ],
  [dnl action-if-not-given
      CXXFLAGS="$CXXFLAGS -DNDEBUG -O3"
  ]
)
# Check for libs
AC_CHECK_LIB([ssl], [SSL_library_init],,[AC_MSG_ERROR([Library ssl not found!])])

AC_ARG_WITH([efence],
  [AS_HELP_STRING([--with-efence], [link with lib efence])],
  [dnl action-if-given
       LDFLAGS="$LDFLAGS -lefence"
       #test -r "/usr/include/efencepp.h" &&
       #CXXFLAGS="$CXXFLAGS -include efencepp.h"
  ],
  [dnl action-if-not-given
       true
  ]
)
# Set efence library
AS_IF([test "x$with_efence" = "xyes" ],
      [AC_CHECK_LIB([efence], [malloc],
		    [],
		    [AC_MSG_ERROR([Electric-Fence library not found!])])])

LDFLAGS="$LDFLAGS -lssl"

AC_SUBST([CXXFLAGS])
AC_SUBST([LDFLAGS])