diff options
-rw-r--r-- | Makefile.am | 5 | ||||
-rw-r--r-- | configure.ac | 5 | ||||
-rw-r--r-- | fetchmailconf.in | 3 | ||||
-rwxr-xr-x | fetchmailconf.py (renamed from fetchmailconf) | 11 |
4 files changed, 19 insertions, 5 deletions
diff --git a/Makefile.am b/Makefile.am index 62985864..7d969b3b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -7,10 +7,11 @@ AM_CPPFLAGS= @CPFLAGS@ AM_LDFLAGS= @LDEFLAGS@ ACLOCAL_AMFLAGS= -I m4 -I m4-local AM_YFLAGS= -d -BUILT_SOURCES= rcfile_y.h +BUILT_SOURCES= rcfile_y.h fetchmailconf bin_PROGRAMS= fetchmail -dist_bin_SCRIPTS= fetchmailconf +nodist_bin_SCRIPTS= fetchmailconf +python_PYTHON= fetchmailconf.py dist_noinst_SCRIPTS= specgen.sh dist_man1_MANS= fetchmail.man fetchmailconf.man diff --git a/configure.ac b/configure.ac index 74736db5..34aeadbb 100644 --- a/configure.ac +++ b/configure.ac @@ -13,6 +13,9 @@ dnl we may need a newer automake version - the oldest tested is 1.7 AC_PREREQ(2.59) AM_INIT_AUTOMAKE(1.5 foreign no-installinfo) +dnl the : states that python is optional +AM_PATH_PYTHON(2.0,,:) + AC_PROG_AWK AC_PROG_CC AC_PROG_INSTALL @@ -736,7 +739,7 @@ if test "$needtrio" = 1 ; then fi dnl ----------------------------------------------------------------' -AC_CONFIG_FILES([Makefile m4/Makefile +AC_CONFIG_FILES([Makefile m4/Makefile fetchmailconf po/Makefile.in]) AC_OUTPUT diff --git a/fetchmailconf.in b/fetchmailconf.in new file mode 100644 index 00000000..79aa0922 --- /dev/null +++ b/fetchmailconf.in @@ -0,0 +1,3 @@ +#! /bin/sh + +exec @PYTHON@ fetchmailconf.py "$@" diff --git a/fetchmailconf b/fetchmailconf.py index 4a014036..ce493627 100755 --- a/fetchmailconf +++ b/fetchmailconf.py @@ -5,7 +5,7 @@ # Matthias Andree <matthias.andree@gmx.de> # Requires Python with Tkinter, and the following OS-dependent services: # posix, posixpath, socket -version = "1.44" +version = "1.46" from Tkinter import * from Dialog import * @@ -2016,13 +2016,20 @@ gUSiYASJpMEHhilJTEnhAlGoQqYAZQ1AiqEMZ0jDGtqQImhwwA13yMMevoQAGvGhEAWHGMOAAAA7 # # Process options - (options, arguments) = getopt.getopt(sys.argv[1:], "df:") + (options, arguments) = getopt.getopt(sys.argv[1:], "df:h") dump = rcfile = None; for (switch, val) in options: if (switch == '-d'): dump = TRUE elif (switch == '-f'): rcfile = val + elif (switch == '-h'): + print """ +Usage: fetchmailconf [-d] [-f fetchmailrc] +-d - dump configuration (for debugging) +-f fmrc - read alternate fetchmailrc file +""" + sys.exit(0) # Get client host's FQDN hostname = socket.gethostbyaddr(socket.gethostname())[0] |