stop building when curl.h isn't found.

This commit is contained in:
Miao Jiang 2012-12-24 20:50:03 +08:00
parent 4a7a5feacf
commit bf0b6555a8

View file

@ -3,10 +3,6 @@
root=`dirname $0` root=`dirname $0`
if [ "$NODE_CURL_H" != "" ] ; then if [ "$NODE_CURL_H" != "" ] ; then
if [ ! -f "$NODE_CURL_H" ] ; then
echo "cannot find curl's header file $NODE_CURL_H ."
exit 1
fi
curl_header=$NODE_CURL_H curl_header=$NODE_CURL_H
elif [ -f "/usr/local/include/curl/curl.h" ] ; then elif [ -f "/usr/local/include/curl/curl.h" ] ; then
curl_header="/usr/local/include/curl/curl.h" curl_header="/usr/local/include/curl/curl.h"
@ -14,7 +10,12 @@ elif [ -f "/usr/include/curl/curl.h" ] ; then
curl_header="/usr/include/curl/curl.h" curl_header="/usr/include/curl/curl.h"
fi fi
echo "extract constants from $curl_header" if [ ! -f $curl_header ] ; then
echo "cannot find curl's header file $curl_header"
exit 1
else
echo "extract constants from $curl_header"
fi
generate() { generate() {
name=$1 name=$1