mirror of
https://bitbucket.org/openhip/openhip/
synced 2023-12-14 05:52:53 +01:00
remove kernel option from autoconf system along with main stub for hipd
git-svn-id: svn://svn.code.sf.net/p/openhip/code/hip/branches/hipv2@145 4c5cb64f-9889-4596-9799-84b02dc3effa
This commit is contained in:
parent
a33a83edf4
commit
845e6f3552
|
@ -36,9 +36,6 @@
|
|||
/* Define to 1 if you have the `ipq' library (-lipq). */
|
||||
#undef HAVE_LIBIPQ
|
||||
|
||||
/* Define to 1 if you have the `ipsec' library (-lipsec). */
|
||||
#undef HAVE_LIBIPSEC
|
||||
|
||||
/* Define to 1 if you have the `ldap' library (-lldap). */
|
||||
#undef HAVE_LIBLDAP
|
||||
|
||||
|
|
103
configure.ac
103
configure.ac
|
@ -64,11 +64,6 @@ if test "x$ac_cv_lib_crypto_RSA_verify" != "xyes"; then
|
|||
fi
|
||||
|
||||
AC_CHECK_LIB([pthread], [pthread_create])
|
||||
# FIXME: Replace `main' with a function in `-liphlpapi':
|
||||
#AC_CHECK_LIB([iphlpapi], [])
|
||||
AC_CHECK_LIB([ipsec], [pfkey_send_hip_x1])
|
||||
# FIXME: Replace `main' with a function in `-lutils':
|
||||
#AC_CHECK_LIB([utils], [main])
|
||||
|
||||
# the simple check below does not work; this could be improved
|
||||
#AC_CHECK_LIB([m], [pow])
|
||||
|
@ -97,14 +92,6 @@ AC_CHECK_FUNCS([bzero gethostbyname gethostname gettimeofday inet_ntoa memmove m
|
|||
|
||||
CFLAGS="$CFLAGS -Wall -DCONFIG_HIP -DSYSCONFDIR=\"\\\"\$(sysconfdir)\\\"\" -DLOCALSTATEDIR=\"\\\"\$(localstatedir)\\\"\" "
|
||||
|
||||
AC_MSG_CHECKING(if --enable-kernel-support option is specified)
|
||||
AC_ARG_ENABLE(kernel-support,
|
||||
[ --enable-kernel-support enable Linux kernel support],
|
||||
[enable_kernel=$enable_kernel_support
|
||||
AC_MSG_RESULT(yes)],
|
||||
[enable_kernel=default
|
||||
AC_MSG_RESULT(no)])
|
||||
|
||||
AC_MSG_CHECKING(if --enable-vpls option is specified)
|
||||
AC_ARG_ENABLE(vpls,
|
||||
[ --enable-vpls=config enable VPLS with configuration via {files, LDAP, IFMAP}],
|
||||
|
@ -121,86 +108,6 @@ AC_ARG_ENABLE(mobile-router,
|
|||
[enable_mobile_router=default
|
||||
AC_MSG_RESULT(no)])
|
||||
|
||||
#
|
||||
# Kernel detection - determines whether to build hipd for use with a HIP kernel
|
||||
################################################################################
|
||||
|
||||
# check for pfkeyv2.h
|
||||
# set kernel_support = yes/no
|
||||
kernel_support=no
|
||||
AC_CANONICAL_HOST
|
||||
case "$host_os" in
|
||||
*linux*)
|
||||
AC_MSG_CHECKING(for Linux kernel headers)
|
||||
AC_ARG_WITH(kernel-headers,
|
||||
AC_HELP_STRING([--with-kernel-headers=/lib/modules/<uname>build/include],
|
||||
[where your Linux kernel headers are installed]),
|
||||
[ KERNEL_INCLUDE="$with_kernel_headers"
|
||||
CONFIGURE_AMFLAGS="--with-kernel-headers=$with_kernel_headers"
|
||||
AC_SUBST(CONFIGURE_AMGFLAGS) ],
|
||||
[ KERNEL_INCLUDE="/lib/modules/`uname -r`/build/include" ])
|
||||
AC_CHECK_HEADER([$KERNEL_INCLUDE/linux/pfkeyv2.h],
|
||||
[kernel_support=yes],
|
||||
[ AC_CHECK_HEADER(/usr/src/linux/include/linux/pfkeyv2.h,
|
||||
[ KERNEL_INCLUDE=/usr/src/linux/include
|
||||
kernel_support=yes],
|
||||
[kernel_support=no])
|
||||
])
|
||||
if test "$kernel_support" = "yes"; then
|
||||
#AC_TRY_RUN
|
||||
# AC_DEFINE(CONFIG_HIP)
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM([[#include "$KERNEL_INCLUDE/linux/pfkeyv2.h"]],
|
||||
[[if (SADB_HIP_ACQUIRE < SADB_HIP_ADD) return 0; else return 99; ]])],
|
||||
[AC_MSG_RESULT([HIP patch was found in pfkeyv2.h.])
|
||||
kernel_support=yes],
|
||||
[AC_MSG_RESULT([HIP patch missing from pfkeyv2.h.])
|
||||
kernel_support=no] )
|
||||
# AC_UNDEFINE(CONFIG_HIP)
|
||||
AC_MSG_CHECKING(if kernel has HIP patch)
|
||||
AC_MSG_RESULT($kernel_support)
|
||||
fi
|
||||
#AC_SUBST(KERNEL_INCLUDE)
|
||||
;;
|
||||
*)
|
||||
kernel_support=no
|
||||
;;
|
||||
esac
|
||||
|
||||
# check configure option vs detected kernel
|
||||
if test "$enable_kernel_support" = "yes"; then
|
||||
if test "$kernel_support" = "no" ; then
|
||||
AC_MSG_ERROR([Kernel support requested, but HIP kernel not found! Aborting.])
|
||||
else
|
||||
want_kernel=true
|
||||
fi
|
||||
else
|
||||
if test "$enable_kernel_support" = "no"; then
|
||||
want_kernel=false
|
||||
else
|
||||
# unspecified
|
||||
if test "$kernel_support" = "yes"; then
|
||||
want_kernel=true
|
||||
else
|
||||
want_kernel=false
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test $want_kernel = true; then
|
||||
CFLAGS="-I$KERNEL_INCLUDE $CFLAGS"
|
||||
fi
|
||||
|
||||
# extra check to make sure libipsec is patched if
|
||||
# we are going to compile kernel support
|
||||
if test "$kernel_support" = "yes"; then
|
||||
if test "x$ac_cv_lib_ipsec_pfkey_send_hip_x1" = "xyes"; then
|
||||
AC_MSG_RESULT([Kernel and libipsec HIP patches OK!]);
|
||||
else
|
||||
AC_MSG_ERROR([Kernel has HIP patch but libipsec has not been patched with HIP patch.])
|
||||
fi
|
||||
fi
|
||||
|
||||
#
|
||||
# configure option to define HIP_VPLS
|
||||
################################################################################
|
||||
|
@ -268,7 +175,6 @@ esac
|
|||
|
||||
# Automake conditionals
|
||||
################################################################################
|
||||
AM_CONDITIONAL(WANT_KERNEL, test x$want_kernel = xtrue)
|
||||
AM_CONDITIONAL(WANT_MOBILE_ROUTER, test x$want_mobile_router = xtrue)
|
||||
AM_CONDITIONAL(WANT_OSX, test x$want_osx = xtrue)
|
||||
AM_CONDITIONAL(WANT_VPLS, test x$want_vpls = xtrue)
|
||||
|
@ -279,8 +185,6 @@ AM_CONDITIONAL(WANT_VPLS_LDAP_CFG,
|
|||
AM_CONDITIONAL(WANT_VPLS_IFMAP_CFG,
|
||||
test x$want_vpls_IFMAP_cfg = xtrue)
|
||||
|
||||
#AC_SUBST(WANT_KERNEL, $want_kernel)
|
||||
|
||||
PKG_CHECK_MODULES(libxml2, libxml-2.0)
|
||||
|
||||
AC_CONFIG_FILES([src/include/hip/hip_version.h
|
||||
|
@ -305,13 +209,6 @@ AC_MSG_NOTICE([ ])
|
|||
AC_MSG_NOTICE([ - building 'hitgen' utility])
|
||||
AC_MSG_NOTICE([ ])
|
||||
|
||||
if test $want_kernel = true; then
|
||||
AC_MSG_NOTICE([ - building HIP daemon 'hipd' for kernel mode])
|
||||
else
|
||||
AC_MSG_NOTICE([ - NOT building HIP daemon 'hipd' for kernel mode])
|
||||
fi
|
||||
AC_MSG_NOTICE([ ])
|
||||
|
||||
if test $want_vpls = true; then
|
||||
AC_MSG_NOTICE([ - building virtual private LAN service extensions])
|
||||
AC_MSG_NOTICE([ - will use $enable_vpls-based configuration library])
|
||||
|
|
|
@ -19,9 +19,6 @@
|
|||
#
|
||||
|
||||
sbin_PROGRAMS = hitgen hip hipstatus
|
||||
if WANT_KERNEL
|
||||
sbin_PROGRAMS += hipd
|
||||
endif
|
||||
|
||||
# HIP protocol source files
|
||||
SRC_PROTO = protocol/hip_addr.c protocol/hip_cache.c protocol/hip_dht.c \
|
||||
|
@ -33,16 +30,12 @@ SRC_PROTO = protocol/hip_addr.c protocol/hip_cache.c protocol/hip_dht.c \
|
|||
SRC_UTIL = util/hip_util.c util/hip_xml.c
|
||||
|
||||
# Linux main files
|
||||
SRC_MAIN_KERN = linux/hip_linux_main.c
|
||||
SRC_MAIN_UMH = linux/hip_linux_umh.c
|
||||
|
||||
# Hitgen source files
|
||||
SRC_HITGEN = util/hitgen.c util/hip_util.c protocol/hip_globals.c
|
||||
|
||||
hitgen_CFLAGS = -DHITGEN
|
||||
if !WANT_KERNEL
|
||||
hitgen_CFLAGS += -D__UMH__
|
||||
endif
|
||||
hitgen_CFLAGS = -DHITGEN -D__UMH__
|
||||
|
||||
# Usermode version
|
||||
hip_CFLAGS = -D__UMH__
|
||||
|
@ -73,12 +66,8 @@ SRC_HITGEN += util/sc_utils.c
|
|||
SUBDIRS = util
|
||||
endif
|
||||
|
||||
# i3 support
|
||||
SRC_PROTO_I3 = protocol/i3_send.c protocol/i3_recv.c
|
||||
|
||||
# different targets
|
||||
hitgen_SOURCES = $(SRC_HITGEN)
|
||||
hipd_SOURCES = $(SRC_PROTO) $(SRC_UTIL) $(SRC_MAIN_KERN)
|
||||
hip_SOURCES = $(SRC_PROTO) $(SRC_UTIL) $(SRC_MAIN_UMH) $(SRC_USERMODE)
|
||||
hipstatus_SOURCES = util/usermode-status.c
|
||||
|
||||
|
|
|
@ -1,28 +0,0 @@
|
|||
/*
|
||||
* Host Identity Protocol
|
||||
* Copyright (C) 2002-06 the Boeing Company
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* hip_linux_main.c
|
||||
*
|
||||
* Authors: Jeff Ahrenholz <jeffrey.m.ahrenholz@boeing.com>
|
||||
*
|
||||
* Stub program for Linux kernel version, calls main_loop().
|
||||
*
|
||||
*/
|
||||
|
||||
extern int main_loop(int argc, char **argv);
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
return(main_loop(argc, argv));
|
||||
}
|
Loading…
Reference in a new issue