/[imapfilter]/imapfilter/config
ViewVC logotype

Diff of /imapfilter/config

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.8 by lefcha, Thu Jul 25 21:22:49 2002 UTC revision 1.8.2.3 by lefcha, Mon Sep 30 15:37:37 2002 UTC
# Line 8  mandir="$destdir/man" Line 8  mandir="$destdir/man"
8    
9  debug="yes"  debug="yes"
10  checkperms="yes"  checkperms="yes"
11    memlock="yes"
12  encpasswds="yes"  encpasswds="yes"
13  ssl="yes"  ssl="yes"
14    
# Line 15  libs="" Line 16  libs=""
16  libenc="-lcrypto"  libenc="-lcrypto"
17  libssl="-lssl -lcrypto"  libssl="-lssl -lcrypto"
18    
19    cflags=""
20    
21  interactive="no"  interactive="no"
22    
23    
# Line 47  do Line 50  do
50        if [ $body = "yes" ]; then checkperms="yes"        if [ $body = "yes" ]; then checkperms="yes"
51        elif [ $body = "no" ]; then checkperms="no"        elif [ $body = "no" ]; then checkperms="no"
52        fi        fi
53        elif [ $head = "memlock" ]
54        then
55          if [ $body = "yes" ]; then memlock="yes"
56          elif [ $body = "no" ]; then memlock="no"
57          fi
58      elif [ $head = "encpasswds" ]      elif [ $head = "encpasswds" ]
59      then      then
60        if [ $body = "yes" ]; then encpasswds="yes"        if [ $body = "yes" ]; then encpasswds="yes"
# Line 78  Description: Line 86  Description:
86  Options:  Options:
87    debug                 Debugging information, useful during development [yes]    debug                 Debugging information, useful during development [yes]
88    checkperms            Configuration file's permissions checking [yes]    checkperms            Configuration file's permissions checking [yes]
89      memlock               Try to lock memory pages to avoid swapping [yes]
90    encpasswds            Encrypted passwords support [yes]    encpasswds            Encrypted passwords support [yes]
91    ssl                   Secure Socket Layer and Transport Layer Security [yes]    ssl                   Secure Socket Layer and Transport Layer Security [yes]
92  EOF  EOF
# Line 91  done Line 100  done
100    
101  if [ $interactive = "yes" ]  if [ $interactive = "yes" ]
102  then  then
103    echo -n "Destination directory [$destdir]: "    printf "Destination directory [$destdir]: "
104    read tmp    read tmp
105    if [ -n "$tmp" ]; then destdir="$tmp"; fi    if [ -n "$tmp" ]; then destdir="$tmp"; fi
106    
107    echo -n "Binaries directory [$bindir]: "    printf "Binaries directory [$bindir]: "
108    read tmp    read tmp
109    if [ -n "$tmp" ]; then bindir="$tmp"; fi    if [ -n "$tmp" ]; then bindir="$tmp"; fi
110    
111    echo -n "Manual pages directory [$mandir]: "    printf "Manual pages directory [$mandir]: "
112    read tmp    read tmp
113    if [ -n "$tmp" ]; then mandir="$tmp"; fi    if [ -n "$tmp" ]; then mandir="$tmp"; fi
114        
115    echo -n "Debugging information [$debug]: "    printf "Debugging information [$debug]: "
116    read tmp    read tmp
117    if [ -n "$tmp" ]; then debug="$tmp"; fi    if [ -n "$tmp" ]; then debug="$tmp"; fi
118        
119    echo -n "Configuration file permissions checking [$checkperms]: "    printf "Configuration file permissions checking [$checkperms]: "
120    read tmp    read tmp
121    if [ -n "$tmp" ]; then checkperms="$tmp"; fi    if [ -n "$tmp" ]; then checkperms="$tmp"; fi
122        
123    echo -n "Encrypted passwords support: "    printf "Try to lock memory pages to avoid swapping [$memlock]: "
124      read tmp
125      if [ -n "$tmp" ]; then memlock="$tmp"; fi
126      
127      printf "Encrypted passwords support: "
128    read tmp    read tmp
129    if [ -n "$tmp" ]; then encpasswds="$tmp"; fi    if [ -n "$tmp" ]; then encpasswds="$tmp"; fi
130    
131    echo -n "Secure Socket Layer and Transport Layer Security [$ssl]: "    printf "Secure Socket Layer and Transport Layer Security [$ssl]: "
132    read tmp    read tmp
133    if [ -n "$tmp" ]; then ssl="$tmp"; fi    if [ -n "$tmp" ]; then ssl="$tmp"; fi
134  else  else
# Line 125  Binaries directory:                                    $bindir Line 138  Binaries directory:                                    $bindir
138  Manual pages directory:                                 $mandir  Manual pages directory:                                 $mandir
139  Debugging information:                                  $debug  Debugging information:                                  $debug
140  Configuration file permissions checking:                $checkperms  Configuration file permissions checking:                $checkperms
141    Try to lock memory pages to avoid swapping:             $memlock
142  Encrypted passwords support:                            $encpasswds  Encrypted passwords support:                            $encpasswds
143  Secure Socket Layer and Transport Layer Security:       $ssl  Secure Socket Layer and Transport Layer Security:       $ssl
144  EOF  EOF
# Line 142  then Line 156  then
156  fi  fi
157    
158    
159    # C flags
160    
161    if [ $debug = "yes" ]
162    then
163      cflags="-g"
164    else
165      cflags="-O"
166    fi
167    
168    
169  # Backup of original Makefile and config.h  # Backup of original Makefile and config.h
170    
# Line 155  mv Makefile Makefile~ Line 178  mv Makefile Makefile~
178    
179  cat > Makefile << EOF  cat > Makefile << EOF
180  CC = cc  CC = cc
181  CFLAGS = -Wall -O2  CFLAGS = $cflags
182    
183  DESTDIR = $destdir  DESTDIR = $destdir
184  BINDIR = $bindir  BINDIR = $bindir
185  MANDIR = $mandir  MANDIR = $mandir
186    
 INSTALL = install -c  
 INST_DIR = install -d  
 INST_BIN = \$(INSTALL) -m 755  
 INST_DOC = \$(INSTALL) -m 644  
   
187  MAN_BIN = imapfilter.1  MAN_BIN = imapfilter.1
188  MAN_RC = imapfilterrc.5  MAN_RC = imapfilterrc.5
189    
# Line 183  data.o file.o imap.o imapfilter.o lock.o Line 201  data.o file.o imap.o imapfilter.o lock.o
201  data.o imapfilter.o imap.o file.o passwd.o request.o socket.o: data.h  data.o imapfilter.o imap.o file.o passwd.o request.o socket.o: data.h
202    
203  install: imapfilter  install: imapfilter
204          if test ! -d \$(BINDIR); then \$(INST_DIR) \$(BINDIR); fi          if test ! -d \$(BINDIR); then mkdir -p \$(BINDIR); fi
205          \$(INST_BIN) \$(BIN) \$(BINDIR)          cp -f \$(BIN) \$(BINDIR) && chmod 0755 \$(BINDIR)/\$(BIN)
206          if test ! -d \$(MANDIR)/man1; then \$(INST_DIR) \$(MANDIR)/man1; fi          if test ! -d \$(MANDIR)/man1; then mkdir -p \$(MANDIR)/man1; fi
207          \$(INST_DOC) \$(MAN_BIN) \$(MANDIR)/man1          cp -f \$(MAN_BIN) \$(MANDIR)/man1 && chmod 0644 \$(MANDIR)/man1/\$(MAN_BIN)
208          if test ! -d \$(MANDIR)/man5; then \$(INST_DIR) \$(MANDIR)/man5; fi          if test ! -d \$(MANDIR)/man5; then \$(MKDIR) \$(MANDIR)/man5; fi
209          \$(INST_DOC) \$(MAN_RC) \$(MANDIR)/man5          cp -f \$(MAN_RC) \$(MANDIR)/man5 && chmod 0644 \$(MANDIR)/man5/\$(MAN_RC)
210    
211  uninstall:  uninstall:
212          rm -f \$(BINDIR)/\$(BIN) \$(MANDIR)/man1/\$(MAN_BIN) \$(MANDIR)/man5/\$(MAN_RC)          rm -f \$(BINDIR)/\$(BIN) \$(MANDIR)/man1/\$(MAN_BIN) \$(MANDIR)/man5/\$(MAN_RC)
# Line 197  clean: Line 215  clean:
215          rm -f \$(OBJ) \$(BIN) imapfilter.core core *.BAK *~          rm -f \$(OBJ) \$(BIN) imapfilter.core core *.BAK *~
216    
217  distclean: clean  distclean: clean
218          @if test -f .Makefile; then mv .Makefile Makefile; fi          @if test -f .Makefile; then mv -f .Makefile Makefile; fi
219          @if test -f .config.h; then mv .config.h config.h; fi          @if test -f .config.h; then mv -f .config.h config.h; fi
   
 .PHONY : install uninstall clean distclean  
220  EOF  EOF
221    
222    
# Line 226  else Line 242  else
242  fi  fi
243  echo >> config.h  echo >> config.h
244    
245    echo "/* Try to lock memory pages to avoid swapping. */" >> config.h
246    if [ $memlock = "yes" ]
247    then
248      echo "#define MEMORY_LOCK" >> config.h
249    else
250      echo "#undef MEMORY_LOCK" >> config.h
251    fi
252    echo >> config.h
253    
254  echo "/* Encrypted passwords support. */" >> config.h  echo "/* Encrypted passwords support. */" >> config.h
255  if [ $encpasswds = "yes" ]  if [ $encpasswds = "yes" ]
256  then  then

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.8.2.3

webmaster@linux.gr
ViewVC Help
Powered by ViewVC 1.1.26