@@ -128,17 +128,6 @@ RTPREFIX=""
128128KERNELDIR=""
129129RTFLAGS=""
130130
131- NONDISTRIBUTABLE=false
132- AC_ARG_ENABLE ( non-distributable ,
133- AS_HELP_STRING (
134- [ --enable-non-distributable] ,
135- [ To build LinuxCNC even if a license problem would render the resulting binaries non-distributable under the terms of the LinuxCNC license] ) ,
136- [
137- case "$enableval" in
138- (yes) NONDISTRIBUTABLE=true ;;
139- esac
140- ] )
141-
142131# #############################################################################
143132# Subsection 2.1 #
144133# Check for arguments to ./configure #
@@ -1526,59 +1515,14 @@ fi
15261515temp_LIBS=$LIBS
15271516LIBS=
15281517
1529- # check for readline.h and friends, optional for halcmd
1530- AC_CHECK_HEADERS ( readline/readline.h , [ HAVE_READLINE=yes] , [ HAVE_READLINE=no] )
1531- AC_CHECK_HEADERS ( readline/history.h , [ ] , [ HAVE_READLINE=no] )
1532-
1533- echo "Trying readline without -ltermcap"
1534- AC_CHECK_LIB ( readline , readline , [ HAVE_READLINE_NOTERMCAP=yes] , [ ] )
1535- unset ac_cv_lib_readline_readline
1536- echo "Trying readline with -ltermcap"
1537- AC_CHECK_LIB ( readline , readline , [ HAVE_READLINE_TERMCAP=yes] , [ ] , - ltermcap )
1538- unset ac_cv_lib_readline_readline
1539-
1540- if test "x$HAVE_READLINE_NOTERMCAP" = "xyes"; then
1541- echo "Readline does not require -ltermcap"
1542- READLINE_LIBS="-lreadline"
1543- elif test "x$HAVE_READLINE_TERMCAP" = "xyes"; then
1544- echo "Readline requires -ltermcap"
1545- READLINE_LIBS="-lreadline -ltermcap"
1546- else
1547- HAVE_READLINE=no
1548- fi
1549-
1550- AC_MSG_CHECKING ( [ whether readline license is compatible with GPL-2] )
1551- AC_COMPILE_IFELSE ( [ AC_LANG_PROGRAM ( [ [
1552- #include <stdio.h>
1553- #include <readline/readline.h>
1554- ] ] , [ [
1555- #if RL_VERSION_MAJOR > 5
1556- #error Readline version 6 and up are not compatible with GPL-2
1557- #endif
1558- ] ] ) ] ,[ AC_MSG_RESULT ( yes ) ] ,[
1559- AC_MSG_RESULT ( no )
1560- AC_MSG_WARN (
1561- [ The LinuxCNC binary you are building may not be
1562- distributable due to a license incompatibility with LinuxCNC (some portions
1563- GPL-2 only) and Readline version 6 and greater (GPL-3 or later).] )
1564- if $NONDISTRIBUTABLE; then
1565- AC_MSG_WARN (
1566- [ User requested to enable non-distributable builds. Continuing.] )
1567- else
1568- AC_MSG_ERROR (
1569- [ To configure LinuxCNC in this way, you must
1570- invoke configure with "--enable-non-distributable=yes". Note that on
1571- Debian-based systems, you may be able to use libeditreadline-dev or
1572- libreadline-gplv2-dev instead of libreadline-dev.] )
1573- fi
1518+ AC_CHECK_HEADERS ( [ editline/readline.h histedit.h] , [ ] , [
1519+ AC_MSG_ERROR ( [ libedit headers not found. Please install libedit-dev or libedit-devel.] )
1520+ ] )
1521+ AC_CHECK_LIB ( [ edit] , [ readline] , [
1522+ READLINE_LIBS="-ledit"
1523+ ] , [
1524+ AC_MSG_ERROR ( [ libedit library (-ledit) not found.] )
15741525] )
1575-
1576- if test "x$HAVE_READLINE" = "xyes"; then
1577- AC_DEFINE ( [ HAVE_READLINE] , [ ] , [ Define to 1 if you have the 'readline' library (-lreadline) and required headers] )
1578- else
1579- AC_MSG_ERROR ( [ Required library 'readline' missing.] )
1580- fi
1581- AC_SUBST ( [ HAVE_READLINE] )
15821526AC_SUBST ( [ READLINE_LIBS] )
15831527
15841528# #############################################################################
0 commit comments