Changeset 481 for trunk/configure.ac
- Timestamp:
- Jul 18, 2015, 5:06:52 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/configure.ac
r477 r481 12 12 dnl start 13 13 dnl 14 AM_INIT_AUTOMAKE(samhain, 3.1.6)14 AM_INIT_AUTOMAKE(samhain, 4.0.0.rc1) 15 15 AC_DEFINE([SAMHAIN], 1, [Application is samhain]) 16 16 AC_CANONICAL_HOST … … 40 40 41 41 AC_HEADER_STDC 42 dnl 43 dnl first one is a dummy because of an autoconf bug 44 dnl (no HAVE_... for first one) 45 dnl 46 AC_CHECK_HEADERS([sys/ipc.h sys/msg.h sys/uio.h fcntl.h]) 42 43 AC_CHECK_HEADERS([sys/ipc.h sys/sem.h sys/msg.h sys/uio.h fcntl.h]) 47 44 48 45 … … 395 392 ) 396 393 AC_CHECK_FUNC(statfs, AC_DEFINE(HAVE_STATFS) statfs="yes", statfs="no") 397 AC_CHECK_VA_COPY394 SL_CHECK_VA_COPY 398 395 AC_CHECK_FUNCS(vsnprintf, [SL_CHECK_VSNPRINTF]) 399 396 AC_CHECK_MLOCK … … 532 529 SH_CHECK_TYPEDEF(long long, HAVE_LONG_LONG) 533 530 SH_CHECK_TYPEDEF(uint16_t, HAVE_UINT16_T) 531 SH_CHECK_TYPEDEF(uint32_t, HAVE_UINT32_T) 534 532 SH_CHECK_TYPEDEF(uint64_t, HAVE_UINT64_T) 535 533 if test "$sh_HAVE_LONG_LONG" = "yes"; then … … 946 944 mytclient="-DSH_WITH_CLIENT" 947 945 yulectl_prg= 946 samhainadmin_prg= 948 947 setpwd_prg="samhain_setpwd" 949 948 sh_main_prg="samhain" … … 958 957 mytclient="-DSH_WITH_SERVER" 959 958 yulectl_prg="yulectl" 959 samhainadmin_prg="scripts/samhainadmin.pl" 960 960 setpwd_prg="samhain_setpwd" 961 961 sh_main_prg="yule" … … 968 968 mytclient="-DSH_STANDALONE" 969 969 yulectl_prg= 970 samhainadmin_prg= 970 971 setpwd_prg= 971 972 sh_main_prg="samhain" … … 981 982 setpwd_prg= 982 983 yulectl_prg= 984 samhainadmin_prg= 983 985 sh_main_prg="samhain" 984 986 dnl AC_CHECK_HEADER(sys/capability.h, … … 990 992 AC_SUBST(setpwd_prg) 991 993 AC_SUBST(yulectl_prg) 994 AC_SUBST(samhainadmin_prg) 992 995 AC_SUBST(sh_main_prg) 993 996 AC_SUBST(mytclient) … … 1013 1016 LIBS="${tmp_LIBS}" 1014 1017 fi 1015 AC_DEFINE(SH_COMPILE_STATIC, 1, [Define if compiling static]) 1016 if test "x$GCC" = "xyes"; then 1017 sh_no_gcc_static=no 1018 LDFLAGS="$LDFLAGS -static" 1018 1019 if test "x$GCC" = "xyes"; 1020 then 1021 case "$host_os" in 1022 1023 *solaris*) 1024 AC_MSG_WARN([option --enable-static ignored on Solaris]) 1025 ;; 1026 1027 *) 1028 AC_DEFINE(SH_COMPILE_STATIC, 1, [Define if compiling static]) 1029 sh_no_gcc_static=no 1030 LDFLAGS="$LDFLAGS -static" 1031 ;; 1032 esac 1019 1033 else 1034 AC_DEFINE(SH_COMPILE_STATIC, 1, [Define if compiling static]) 1020 1035 sh_no_gcc_static=yes 1021 1036 case "$host_os" in … … 1744 1759 fi 1745 1760 1746 dnl if test ! -z "`echo "$CFLAGS" | grep "\-O2" 2> /dev/null`" ; then 1747 dnl CFLAGS=`echo $CFLAGS | sed 's%\-O2%\-O3%' ` 1748 dnl fi 1749 1761 dnl -W is the older name for -Wextra 1762 1763 1750 1764 if test -z "`echo "$CFLAGS" | grep "\-Wall" 2> /dev/null`" ; then 1751 CFLAGS="$CFLAGS -Wall -W " 1765 case "$host_os" in 1766 *solaris*) 1767 CFLAGS="$CFLAGS -Wall -W -Wno-missing-braces " 1768 ;; 1769 *) 1770 CFLAGS="$CFLAGS -Wall -W " 1771 ;; 1772 esac 1752 1773 fi 1753 1774 … … 1864 1885 if test "x${enable_encrypt}" = xno; then 1865 1886 myencrypt=no 1866 elif test "x${enable_encrypt}" = "x1"; then1867 myencrypt=11868 1887 fi 1869 1888 ] … … 1872 1891 AC_DEFINE(SH_ENCRYPT) 1873 1892 AC_DEFINE(SH_ENCRYPT_2) 1874 elif test "x${myencrypt}" = "x1"; then1875 AC_DEFINE(SH_ENCRYPT)1876 1893 fi 1877 1894 … … 2068 2085 AC_SUBST(need_user_install) 2069 2086 2070 sh_insmod_cmd=": # no kernel module"2071 sh_insmod_pre=": # no kernel module"2072 sh_lkm=""2073 lkm_inc=""2074 khidemap="/boot/System.map"2075 sh_syscalltable="0x0"2076 AC_ARG_ENABLE(khide,2077 [ --enable-khide=SYSTEM_MAP use kernel module to hide (Linux only)[[/boot/System.map]]],2078 [2079 if test "x${enable_khide}" != xno; then2080 2081 kernel_testsupport=`uname -r | sed s,^3.*,LINUX3,`2082 if test "x${kernel_testsupport}" = "xLINUX3"; then2083 AC_MSG_ERROR([The --enable-khide option is not supported on Linux kernel version 3.x or above.])2084 fi2085 2086 if test "x${enableval}" != "xyes"; then2087 khidemap="${enableval}"2088 fi2089 sh_syscalltable=`egrep '(D|d|R|r) sys_call_table' ${khidemap} | awk '{print $1}'`2090 if test x"$sh_syscalltable" = x; then2091 AC_MSG_ERROR([Option --enable-khide cannot be used since the symbol sys_call_table was not found in ${khidemap}.])2092 fi2093 sh_syscalltable="0x${sh_syscalltable}"2094 install_name_len=`echo ${install_name} | awk '{ print(length()); }'`2095 if test "${install_name_len}" -gt 15 ; then2096 AC_MSG_ERROR([If --enable-khide is used, install_name must not exceed a length of 15 chars.])2097 fi2098 AC_DEFINE(SH_USE_LKM)2099 AC_DEFINE_UNQUOTED(SH_MAGIC_HIDE, "${install_name}")2100 2101 # -- NEW --2102 kernel_version=`uname -r | sed s,2.6.*,LINUX26,`2103 kernel_numeric=`uname -r | sed 's%-%.%g' | sed 's%_%.%g' | awk -F. '{ print $1*65536+$2*256+$3 }'`2104 AC_DEFINE_UNQUOTED(SH_KERNEL_NUMERIC, ${kernel_numeric}, [Kernel number])2105 2106 if test x"$kernel_version" = xLINUX262107 then2108 AC_MSG_CHECKING([for modlist_lock])2109 sh_modlist_lock=`egrep ['[bd] modlist_lock$'] ${khidemap} | awk '{print $1}'`2110 if test x"$sh_modlist_lock" = x; then2111 AC_MSG_RESULT(no)2112 else2113 sh_modlist_lock="0x${sh_modlist_lock}"2114 AC_MSG_RESULT([${sh_modlist_lock}])2115 AC_DEFINE_UNQUOTED(SH_MODLIST_LOCK, ${sh_modlist_lock}, [The address of the modules list spinlock])2116 fi2117 2118 AC_MSG_CHECKING([for module_mutex])2119 sh_modlist_mutex=`egrep ['[bd] module_mutex$'] ${khidemap} | awk '{print $1}'`2120 if test x"$sh_modlist_mutex" = x; then2121 AC_MSG_RESULT(no)2122 else2123 sh_modlist_mutex="0x${sh_modlist_mutex}"2124 AC_MSG_RESULT([${sh_modlist_mutex}])2125 AC_DEFINE_UNQUOTED(SH_MODLIST_MUTEX, ${sh_modlist_mutex}, [The address of the modules list mutex])2126 fi2127 2128 sh_list_modules=`egrep 'd modules$' ${khidemap} | awk '{print $1}'`2129 if test x"$sh_list_modules" = x; then2130 AC_MSG_ERROR([Option --enable-khide cannot be used, since the symbol modules was not found in ${khidemap}.])2131 fi2132 sh_list_modules="0x${sh_list_modules}"2133 AC_DEFINE_UNQUOTED(SH_LIST_MODULES, ${sh_list_modules}, [The address of the modules list])2134 2135 AC_DEFINE(LINUX26, 1, [Define if kernel is 2.6])2136 sh_insmod_cmd="modprobe ${install_name}_hide"2137 sh_lkm="samhain_hide.ko"2138 else2139 sh_insmod_cmd="insmod ${install_name}_hide; insmod ${install_name}_erase; rmmod ${install_name}_erase"2140 sh_lkm="samhain_hide.o samhain_erase.o"2141 fi2142 # -- END NEW --2143 2144 kvers=`uname -r`2145 if test -f /lib/modules/${kvers}/build/include/linux/kernel.h; then2146 lkm_inc="-I/lib/modules/${kvers}/build/include"2147 else2148 AC_MSG_WARN([--enable-khide: /lib/modules/${kvers}/build/include/linux not found])2149 AC_MSG_WARN([--enable-khide: You may need to install the kernel-source])2150 AC_MSG_WARN([--enable-khide: headers for the currently-running kernel.])2151 fi2152 2153 AC_MSG_CHECKING([for 2.4 vanilla kernel])2154 sh_is_vanilla_kernel=yes2155 if test -f /lib/modules/${kvers}/build/include/linux/sched.h; then2156 grep 'next_task,' /lib/modules/${kvers}/build/include/linux/sched.h >/dev/null 2>&1 || sh_is_vanilla_kernel=no2157 fi2158 if test x"${sh_is_vanilla_kernel}" = xno; then2159 AC_MSG_RESULT(no)2160 else2161 AC_MSG_RESULT(yes)2162 AC_DEFINE(SH_VANILLA_KERNEL)2163 fi2164 2165 fi2166 ]2167 )2168 2169 2087 AC_SUBST(install_name) 2170 2088 AC_SUBST(INSTALL_NAME) … … 2194 2112 ) 2195 2113 2196 2197 systemmap="/boot/System.map"2198 sh_libkvm=""2199 AC_ARG_WITH(kcheck,2200 [ --with-kcheck[[=SYSTEM_MAP]] check Linux/FreeBSD/OpenBSD kernel integrity [[/boot/System.map]]],2201 [2202 if test "x${withval}" != "xno"; then2203 AC_DEFINE(SH_USE_KERN)2204 2205 kernel_numeric=`uname -r | sed 's%-%.%g' | sed 's%_%.%g' | awk -F. '{ print $1*65536+$2*256+$3 }'`2206 AC_DEFINE_UNQUOTED(SH_KERNEL_NUMBER, ${kernel_numeric}, [Kernel number])2207 2208 kernelversion=`uname -r`2209 AC_DEFINE_UNQUOTED(SH_KERNEL_VERSION, _("${kernelversion}"), [Define the kernel version])2210 2211 if test "x${withval}" != "xyes"; then2212 systemmap="${withval}"2213 fi2214 2215 if test "x${cross_compiling}" = xyes; then2216 :2217 elif test "x$selectconfig" = "xfreebsd"; then2218 LIBS="$LIBS -lkvm"2219 sh_libkvm="-lkvm"2220 elif test -f "${systemmap}"; then2221 2222 test_kmap_open=no2223 2224 if test -c /dev/kmem; then2225 AC_MSG_CHECKING([whether /dev/kmem is useable])2226 dd bs=4 count=16 if=/dev/kmem of=/dev/null >/dev/null 2>&12227 if test $? -eq 0; then2228 test_kmap_open=yes2229 fi2230 AC_MSG_RESULT([${test_kmap_open}])2231 fi2232 2233 if test x"${test_kmap_open}" = xno; then2234 # need kernel module2235 2236 if test -f /lib/modules/${kernelversion}/build/include/linux/kernel.h; then2237 lkm_inc="-I/lib/modules/${kernelversion}/build/include"2238 else2239 AC_MSG_WARN([--enable-khide: /lib/modules/${kernelversion}/build/include/linux not found])2240 AC_MSG_WARN([--enable-khide: You may need to install the kernel-source])2241 AC_MSG_WARN([--enable-khide: headers for the currently-running kernel.])2242 fi2243 2244 AC_MSG_CHECKING([for vmlist_lock])2245 sh_vmlist_lock=`egrep ['[bdBD] vmlist_lock$'] ${systemmap} | awk '{print $1}'`2246 if test x"$sh_vmlist_lock" = x; then2247 AC_MSG_RESULT(no)2248 else2249 sh_vmlist_lock="0x${sh_vmlist_lock}"2250 AC_MSG_RESULT([${sh_vmlist_lock}])2251 AC_DEFINE_UNQUOTED(SH_VMLIST_LOCK, ${sh_vmlist_lock}, [The address of the vmlist spinlock])2252 fi2253 2254 AC_MSG_CHECKING([for vmlist])2255 sh_vmlist=`egrep ['[bdBD] vmlist$'] ${systemmap} | awk '{print $1}'`2256 if test x"$sh_vmlist" = x; then2257 AC_MSG_RESULT(no)2258 else2259 sh_vmlist="0x${sh_vmlist}"2260 AC_MSG_RESULT([${sh_vmlist}])2261 AC_DEFINE_UNQUOTED(SH_VMLIST, ${sh_vmlist}, [The address of the vmlist])2262 fi2263 2264 sh_lkm="${sh_lkm} samhain_kmem.ko"2265 sh_insmod_pre="modprobe ${install_name}_kmem"2266 2267 fi2268 else2269 AC_MSG_ERROR([Option --with-kcheck=systemmap cannot be used, because system map ${systemmap} does not exist.])2270 fi2271 fi2272 ]2273 )2274 2275 AC_SUBST(lkm_inc)2276 AC_SUBST(sh_lkm)2277 AC_SUBST(sh_insmod_cmd)2278 AC_SUBST(sh_insmod_pre)2279 2280 AC_SUBST(systemmap)2281 AC_SUBST(sh_libkvm)2282 2114 2283 2115 AC_ARG_ENABLE(base, … … 2425 2257 ) 2426 2258 2259 2260 2427 2261 AC_ARG_WITH(keyid, 2428 2262 [ --with-keyid=KEYID specify KeyID (0x...) for GPG/PGP functions [[none]]], … … 2896 2730 echo " Configuration file: ${myconffile}" 2897 2731 echo " Manual pages: ${mandir}" 2898 echo " Data: ${mydataroot}" 2732 echo " Data directory: ${mydataroot}" 2733 echo " Database file: ${mydatafile}" 2899 2734 echo " PID file: ${mylockfile}" 2900 2735 echo " Log file: ${mylogfile}"
Note:
See TracChangeset
for help on using the changeset viewer.