Skip to content
Extraits de code Groupes Projets
Vérifiée Valider e35d4dae rédigé par Kubat's avatar Kubat
Parcourir les fichiers

Disallow building in the source directory (because of generated files)

parent a2e67c44
Aucune branche associée trouvée
Aucune étiquette associée trouvée
1 requête de fusion!105Refactor and more
......@@ -5,12 +5,20 @@ AC_CONFIG_MACRO_DIRS([config/m4])
AC_LANG(C)
AC_PREFIX_DEFAULT(/usr/local)
##########
# CHECKS #
##########
AC_PATH_PROG([XXD],[xxd],[:])
AC_PATH_PROG([MAN],[man],[:])
AS_IF([test "$XXD" = "notfound"], [AC_MSG_ERROR([xxd is required])])
AS_IF([test "$MAN" = "notfound"], [AC_MSG_ERROR([man is required])])
# Checks
LKT_PATH_SOURCE="$(dirname $(readlink -f "$0"))"
LKT_PATH_BUILD="$(pwd)"
AS_IF([test "$LKT_PATH_SOURCE" = "$LKT_PATH_BUILD"],
[AC_MSG_ERROR([The build directory can't be the same as the source directory])])
AC_CHECK_LIB([sqlite3], [sqlite3_open_v2])
AC_CHECK_HEADERS_ONCE([
sqlite3.h
......@@ -29,12 +37,6 @@ AC_CHECK_HEADERS_ONCE([
regex.h
locale.h
assert.h
regex
stdexcept
vector
string
locale
type_traits
])
AC_C_INLINE
......@@ -51,7 +53,9 @@ AC_TYPE_UINT32_T
AC_TYPE_UINT64_T
AC_TYPE_UINT8_T
# More rules
##############
# MORE RULES #
##############
AM_SILENT_RULES([yes])
AM_PROG_AR
......@@ -67,10 +71,10 @@ AC_PROG_CC
AC_PROG_INSTALL
AM_PROG_AS
# Little or big endian
LKT_ENDIANES_LITTLE="$(echo -n I | od -to2 | head -n1 | cut -f2 -d" " | cut -c6)"
###########
# OPTIONS #
###########
# Options
AC_ARG_WITH([debug],
[AS_HELP_STRING([--with-debug],
[Enable debug so you can use gdb])],
......@@ -103,7 +107,19 @@ LKT_BUILD_STRING="$CC $(uname -r) $(uname -m)"
AC_DEFINE_UNQUOTED([LKT_BUILD_STRING], ["$LKT_BUILD_STRING"], [Build string])
AC_SUBST([LKT_BUILD_STRING])
# CFLAGS
LKT_ENDIANES_LITTLE="$(echo -n I | od -to2 | head -n1 | cut -f2 -d" " | cut -c6)"
if test "$LKT_ENDIANES_LITTLE" = "1" ; then
AC_DEFINE_UNQUOTED([LKT_ENDIANES_LITTLE], [], [Little endian])
AC_SUBST([LKT_ENDIANES_LITTLE])
else
AC_DEFINE_UNQUOTED([LKT_ENDIANES_BIG], [], [Big endian])
AC_SUBST([LKT_ENDIANES_BIG])
fi
##########
# CFLAGS #
##########
BASEFLAGS="-Werror -Wall -I../inc/"
if test "x${LKT_DEBUG_ENABLED}" = "xyes"; then
BASEFLAGS+=" -g"
......@@ -112,7 +128,10 @@ else
fi
CFLAGS="${BASEFLAGS} -std=c18"
# Output
##########
# OUTPUT #
##########
AC_CONFIG_HEADERS([inc/lektor/lktconfig.h])
AC_OUTPUT([
Makefile
......@@ -120,7 +139,10 @@ AC_OUTPUT([
src/Makefile
])
# Conf result
################
# CONF RESULTS #
################
LKT_CONFIG_RESULT="
########## Lektor configuration ###########
#
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter