AM_CONDITIONAL([BUILD_SCRIPTLIVE], [test "x$build_scriptlive" = xyes])
-UL_BUILD_INIT([col], [yes])
+UL_BUILD_INIT([col], [check])
+UL_REQUIRES_COMPILE([col], [#include <limits.h>], [__GLIBC__], [building for glibc])
AM_CONDITIONAL([BUILD_COL], [test "x$build_col" = xyes])
UL_BUILD_INIT([colcrt], [yes])
conf.set('PG_BELL', get_option('pg-bell') ? 1 : false)
conf.set('USE_COLORS_BY_DEFAULT', get_option('colors-default') ? 1 : false)
+is_glibc = cc.has_header_symbol('limits.h', '__GLIBC__')
+
############################################################
############################################################
-exe = executable(
- 'col',
- col_sources,
- include_directories : includes,
- link_with : lib_common,
- install_dir : usrbin_exec_dir,
- install : true)
-exes += exe
-manadocs += ['text-utils/col.1.adoc']
-bashcompletions += ['col']
+if is_glibc
+ exe = executable(
+ 'col',
+ col_sources,
+ include_directories : includes,
+ link_with : lib_common,
+ install_dir : usrbin_exec_dir,
+ install : true)
+ exes += exe
+ manadocs += ['text-utils/col.1.adoc']
+ bashcompletions += ['col']
+endif
exe = executable(
'colcrt',