Annotation of libaitcfg/configure.in, revision 1.31.2.3

1.2       misho       1: #
                      2: # $Author: misho $
1.31.2.3! misho       3: # $Id: configure.in,v 1.31.2.2 2024/08/19 19:33:19 misho Exp $
1.2       misho       4: #
1.31.2.1  misho       5: AC_INIT(libaitcfg, 9.5, misho@elwix.org)
1.2       misho       6: AC_CONFIG_SRCDIR([src/aitcfg.c])
                      7: AC_CONFIG_HEADERS([inc/config.h])
                      8: 
1.15      misho       9: ac_cv_func_malloc_0_nonnull="yes"
                     10: ac_cv_func_realloc_0_nonnull="yes"
                     11: 
1.2       misho      12: # Checks for programs.
                     13: AC_PROG_CC
                     14: AC_PROG_INSTALL
1.22      misho      15: AC_PROG_RANLIB
1.2       misho      16: 
                     17: AC_CANONICAL_HOST
                     18: AC_CANONICAL_TARGET
                     19: 
1.22      misho      20: AC_CHECK_TOOL(MKDEP, mkdep, ../mkdep)
1.2       misho      21: AC_SUBST(MKDEP)
                     22: 
1.31.2.3! misho      23: if test x"${prefix}" = x"NONE"; then
        !            24:        prefix="/usr/local"
        !            25: fi
        !            26: if test x"${exec_prefix}" = x"NONE"; then
        !            27:        exec_prefix=${prefix}
        !            28: fi
        !            29: 
1.31.2.2  misho      30: if test "${ac_cv_env_CFLAGS_set}" != "set"; then
                     31:        CFLAGS="-Wall -O2 -I${includedir}"
                     32: else
                     33:        CFLAGS="${ac_cv_env_CFLAGS_value}"
                     34: fi
                     35: if test "${ac_cv_env_LDFLAGS_set}" = "set"; then
                     36:        LDFLAGS="${ac_cv_env_LDFLAGS_value}"
                     37: else
1.31.2.3! misho      38:        LDFLAGS="-L$(eval echo ${libdir})"
1.31.2.2  misho      39: fi
                     40: 
1.2       misho      41: 
                     42: # Checks for libraries.
1.7       misho      43: AC_CHECK_LIB([pthread], [pthread_mutex_lock])
1.15      misho      44: AC_CHECK_LIB([elwix], [str_Trim])
1.2       misho      45: 
                     46: # Checks for header files.
1.31.2.2  misho      47: AC_CHECK_HEADERS([stdint.h stdlib.h string.h unistd.h])
                     48: AC_CHECK_HEADERS([bsd/string.h])
1.2       misho      49: 
                     50: # Checks for typedefs, structures, and compiler characteristics.
                     51: AC_C_CONST
                     52: AC_C_INLINE
                     53: 
                     54: # Checks for library functions.
                     55: AC_FUNC_MALLOC
                     56: AC_FUNC_REALLOC
1.31.2.2  misho      57: AC_CHECK_FUNCS([memmove memset strchr strspn])
1.2       misho      58: 
                     59: DEBUG=no
                     60: AC_MSG_CHECKING(Debug Build)
                     61: AC_ARG_ENABLE(debug,
                     62:        [  --enable-debug          Build library with debug information and additional messages],
                     63:        [ DEBUG=$enableval
                     64:                case "$enableval" in
                     65:                        yes)
                     66:                                AC_DEFINE(__DEBUG,, [Build libraries with debug information and additional messages])
                     67:                                CFLAGS="-g ${CFLAGS}"
                     68:                                ;;
                     69:                        *)
1.31.2.2  misho      70:                                AC_DEFINE(NDEBUG,, [Turn off debug asserts])
1.2       misho      71:                                ;;
1.31.2.2  misho      72:                esac ], AC_DEFINE(NDEBUG,, [Turn off debug asserts]))
1.2       misho      73: AC_MSG_RESULT($DEBUG)
                     74: 
1.31.2.2  misho      75: DEBIAN_ARCH=$target_cpu
                     76: AS_IF([ test "x$target_cpu" = "xarm6l" -o "x$target_cpu" = "xarm7l" ], DEBIAN_ARCH="armhf") 
                     77: AS_IF([ test "x$target_cpu" = "xaarch64" ], DEBIAN_ARCH="arm64") 
                     78: AS_IF([ test "x$target_cpu" = "xi686" ], DEBIAN_ARCH="i386") 
                     79: AS_IF([ test "x$target_cpu" = "xx86_64" ], DEBIAN_ARCH="amd64") 
                     80: AC_SUBST(DEBIAN_ARCH)
                     81: 
1.2       misho      82: AC_CONFIG_FILES([Makefile
                     83:                inc/Makefile
                     84:                lib/Makefile
1.31      misho      85:                debian/Makefile
1.31.2.2  misho      86:                debian/control
1.2       misho      87:                src/Makefile])
                     88: AC_OUTPUT

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>