CFLAGS="-fPIC -Wall"
LDFLAGS="-shared"
+IDN_LIBRARY=idn
# Help
show_help() {
then
IDNA_LIBS="$ICU_FLAGS"
CFLAGS="$CFLAGS -DUSE_STRINGPREP_ICU"
-else
- if [ "$IDN_LIBRARY" = "idn" ]
- then
- IDNA_LIBS="-l$IDN_LIB"
- else
- echo "Must use idn or icu as argument for --idn-library!"
- exit 1
- fi
fi
+if [ "$IDN_LIBRARY" = "idn" ]
+then
+ IDNA_LIBS="-l$IDN_LIB"
+fi
+
LDFLAGS="$LDFLAGS -llua$LUA_SUFFIX"
echo -n "Checking Lua includes... "
/***************** STRINGPREP *****************/
#ifndef USE_STRINGPREP_ICU
/****************** libidn ********************/
+extern "C" {
#include <stringprep.h>
-
+}
static int stringprep_prep(lua_State *L, const Stringprep_profile *profile)
{
size_t len;
return 1; // TODO return error message
}
strcpy(string, s);
- ret = stringprep(string, 1024, 0, profile);
+ ret = stringprep(string, 1024, (Stringprep_profile_flags)0, profile);
if (ret == STRINGPREP_OK) {
lua_pushstring(L, string);
return 1;
#else
#include <unicode/usprep.h>
-//#include <unicode/stringpiece.h>
#include <unicode/unistr.h>
#include <unicode/utrace.h>