fi
CPPFLAGS="$CPPFLAGS $IDN_CFLAGS"
LDFLAGS="$LDFLAGS $IDN_LIBS"
+ AC_DEFINE(HAVE_LIBIDN, 1, [IDN Support])
],[AC_MSG_ERROR([could not find libidn])])
fi
])
m4/Makefile
po/Makefile.in
apidoc/Makefile apidoc/doxygen.cfg
- doc/Makefile doc/instdoc.sh
lib-lib/Makefile
lib-lua/Makefile
lib-mime/Makefile
#include "mutt_signal.h"
#include "mutt_ssl.h"
+#ifdef HAVE_LIBIDN
+#include <idna.h>
+#endif
#include "mutt_idna.h"
/* support for multiple socket connections */
/* The low-level interface we use. */
-#ifndef HAVE_LIBIDN
-
-int mutt_idna_to_local (const char *in, char **out, int flags __attribute__ ((unused)))
-{
- *out = m_strdup(in);
- return 1;
-}
-
-int mutt_local_to_idna (const char *in, char **out)
-{
- *out = m_strdup(in);
- return 0;
-}
-
-#else
-
-int mutt_idna_to_local (const char *in, char **out, int flags)
+static int mutt_idna_to_local (const char *in, char **out, int flags)
{
+#ifdef HAVE_LIBIDN
*out = NULL;
if (!option (OPTUSEIDN))
notrans:
p_delete(out);
+#endif
*out = m_strdup(in);
return 1;
}
-int mutt_local_to_idna (const char *in, char **out)
+static int mutt_local_to_idna (const char *in, char **out)
{
+#ifdef HAVE_LIBIDN
int rv = 0;
char *tmp = m_strdup(in);
*out = m_strdup(in);
}
return rv;
-}
-
+#else
+ *out = m_strdup(in);
+ return 0;
#endif
-
+}
/* higher level functions */
#define MI_MAY_BE_IRREVERSIBLE (1 << 0)
-int mutt_idna_to_local (const char *, char **, int);
-int mutt_local_to_idna (const char *, char **);
-
int mutt_addrlist_to_idna (address_t *, char **);
int mutt_addrlist_to_local (address_t *);