diff --git a/cbits/execvpe.c b/cbits/execvpe.c
index 82e1bdc8b1aae68307b6b879472d2b09dd3289d2..708b8b2c50c887982463036247516f5ca72c6023 100644
--- a/cbits/execvpe.c
+++ b/cbits/execvpe.c
@@ -25,6 +25,11 @@
 #define HSUNIX_EXECVPE_H_NO_COMPAT
 #include "execvpe.h"
 
+#if !defined(execvpe) && !HAVE_DECL_EXECVPE
+// On some archs such as AIX, the prototype may be missing
+int execvpe(const char *file, char *const argv[], char *const envp[]);
+#endif
+
 /*
  * We want the search semantics of execvp, but we want to provide our
  * own environment, like execve.  The following copyright applies to
diff --git a/configure.ac b/configure.ac
index f8836245d522504626ff645bcf3d0d6ca642225a..5b6eb7c602e274229930c05a3d7bb6e68d66b0a8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -41,6 +41,7 @@ dnl not available on android so check for it
 AC_CHECK_FUNCS([telldir seekdir])
 
 dnl This is e.g. available as a GNU extension in glibc 2.11+
+AC_CHECK_DECLS([execvpe])
 AC_CHECK_FUNCS([execvpe])
 
 AC_CHECK_MEMBERS([struct stat.st_atim])