pcap_rw: check hdr->len for 0 earlier
[netsniff-ng.git] / src / curvetun / nacl_path.sh
blobb639500a4f60256d8496199253d51a505de0db6e
1 #!/bin/sh
4 # netsniff-ng - the packet sniffing beast
5 # By Emmanuel Roullit <emmanuel@netsniff-ng.org>
6 # Copyright 2009, 2011 Emmanuel Roullit.
7 # Subject to the GPL, version 2.
10 <<POD
12 =head1 NAME
14 nacl_path.sh - Generate include file for CMake where path to NaCl are written
16 =head1 SYNOPSIS
18 nacl_path.sh <include_path> <lib_path>
20 =head1 DESCRIPTION
22 This script was written to faciliate NaCl building and
23 integration in the netsniff-g toolkit infrastructure.
25 It writes the given path to NaCl library and its header files in nacl_path.cmake.
27 The following file is then included by CMake to find NaCl
28 for the linking operation.
30 It is particulary useful to use it when NaCl has been previously built on
31 the target.
33 =head1 AUTHOR
35 Written by Emmanuel Roullit <emmanuel@netsniff-ng.org>
37 =cut
39 POD
41 nacl_include_path="$1"
42 nacl_lib_path="$2"
44 if test -z $nacl_include_path || test -z $nacl_lib_path; then
45 echo "Please input the path where NaCl is like the following:"
46 echo "./$0.sh <include_path> <lib_path>"
47 exit 1
50 echo "SET(NACL_INCLUDE_DIR $nacl_include_path)" > nacl_path.cmake
51 echo "SET(NACL_LIB_DIR $nacl_lib_path)" >> nacl_path.cmake