score.c send.c sendlib.c signal.c sort.c \
status.c system.c thread.c charset.c history.c lib.c \
muttlib.c editmsg.c mbyte.c \
- url.c ascii.c mutt_idna.c crypt-mod.c crypt-mod.h
+ url.c ascii.c crypt-mod.c crypt-mod.h
nodist_mutt_SOURCES = $(BUILT_SOURCES)
CPPFLAGS=@CPPFLAGS@
-EXTRA_mutt_SOURCES = account.c md5.c mutt_sasl.c mutt_socket.c mutt_ssl.c \
- mutt_tunnel.c pop.c pop_auth.c pop_lib.c smime.c pgp.c pgpinvoke.c pgpkey.c \
- pgplib.c sha1.c pgpmicalg.c gnupgparse.c resize.c dotlock.c remailer.c \
- smtp.c browser.h mbyte.h remailer.h url.h \
- crypt-mod-pgp-classic.c crypt-mod-smime-classic.c \
- pgppacket.c mutt_idna.h hcache.h hcache.c bcache.c bcache.h mutt_ssl_gnutls.c \
- crypt-gpgme.c crypt-mod-pgp-gpgme.c crypt-mod-smime-gpgme.c \
- utf8.c wcwidth.c
+EXTRA_mutt_SOURCES = account.c bcache.c crypt-gpgme.c crypt-mod-pgp-classic.c \
+ crypt-mod-pgp-gpgme.c crypt-mod-smime-classic.c \
+ crypt-mod-smime-gpgme.c dotlock.c gnupgparse.c hcache.c md5.c \
+ mutt_idna.c mutt_sasl.c mutt_socket.c mutt_ssl.c mutt_ssl_gnutls.c \
+ mutt_tunnel.c pgp.c pgpinvoke.c pgpkey.c pgplib.c pgpmicalg.c \
+ pgppacket.c pop.c pop_auth.c pop_lib.c remailer.c resize.c sha1.c \
+ smime.c smtp.c utf8.c wcwidth.c \
+ bcache.h browser.h hcache.h mbyte.h mutt_idna.h remailer.h url.h
EXTRA_DIST = COPYRIGHT GPL OPS OPS.PGP OPS.CRYPT OPS.SMIME TODO UPDATING \
configure account.h \
AC_MSG_ERROR([IDN requested but iconv is disabled or unavailable])
fi
else
- AC_CHECK_LIB(idn, stringprep_check_version)
+ AC_SEARCH_LIBS([stringprep_check_version], [idn], [
+ AC_DEFINE([HAVE_LIBIDN], 1, [Define to 1 if you have the `idn' library])
+ MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS mutt_idna.o"
+ ])
AC_CHECK_FUNCS(idna_to_unicode_utf8_from_utf8 idna_to_unicode_8z8z)
AC_CHECK_FUNCS(idna_to_ascii_from_utf8 idna_to_ascii_8z)
AC_CHECK_FUNCS(idna_to_ascii_lz idna_to_ascii_from_locale)
/* The low-level interface we use. */
-#ifndef HAVE_LIBIDN
-
-int mutt_idna_to_local (const char *in, char **out, int flags)
-{
- *out = safe_strdup (in);
- return 1;
-}
-
-int mutt_local_to_idna (const char *in, char **out)
-{
- *out = safe_strdup (in);
- return 0;
-}
-
-#else
+#ifdef HAVE_LIBIDN
/* check whether an address is an IDN */
#define MI_MAY_BE_IRREVERSIBLE (1 << 0)
-int mutt_idna_to_local (const char *, char **, int);
-int mutt_local_to_idna (const char *, char **);
-
/* Work around incompatibilities in the libidn API */
#ifdef HAVE_LIBIDN
# endif
#else
-#define mutt_addrlist_to_idna(addr, err) 0
-#define mutt_addrlist_to_local(addr) 0
+static inline int mutt_addrlist_to_idna (ADDRESS *addr, char **err)
+{
+ return 0;
+}
+
+static inline int mutt_addrlist_to_local (ADDRESS *addr)
+{
+ return 0;
+}
+
+static inline void mutt_env_to_local (ENVELOPE *env)
+{
+ return;
+}
-#define mutt_env_to_local(env)
-#define mutt_env_to_idna(env, tag, err) 0
+static inline int mutt_env_to_idna (ENVELOPE *env, char **tag, char **err)
+{
+ return 0;
+}
-#define mutt_addr_for_display(a) (a->mailbox)
+static inline const char *mutt_addr_for_display (ADDRESS *a)
+{
+ return a->mailbox;
+}
#endif /* HAVE_LIBIDN */