lbdb-0.38ubuntu1/0000775000000000000000000000000011601371461010563 5ustar lbdb-0.38ubuntu1/m_palm.sh.in0000664000000000000000000000234611214161326012773 0ustar #! @SH@ # # -*-sh-*- # # m_palm - Palm address database module for lbdb # Copyright (C) 2000 Dave Pearson # Copyright (C) 2005 Roland Rosenfeld # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software Foundation, # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,, USA. # # $Id: m_palm.sh.in,v 1.8 2009-06-11 10:56:22 roland Exp $ prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ m_palm_query () { palmdatabase=${PALM_ADDRESS_DATABASE:-$HOME/.jpilot/AddressDB.pdb} test -f $palmdatabase || return $libdir/palm_lsaddr $palmdatabase | grep -ia "$@" || : } lbdb-0.38ubuntu1/m_abook.sh.in0000664000000000000000000000241510330705651013135 0ustar #! @SH@ # # -*-sh-mode-*- # # Copyright (C) 2000 Ross Campbell # Copyright (C) 2000-2005 Roland Rosenfeld # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software Foundation, # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,, USA. # # $Id: m_abook.sh.in,v 1.6 2005-10-29 14:48:09 roland Exp $ m_abook_query() { ABOOK=@ABOOK@ if [ -x "$ABOOK" ] # check whether abook in installed then for book in ${ABOOK_FILES:-$HOME/.abook/addressbook $HOME/.abook.addressbook} do if [ -f "$book" ] then $ABOOK --datafile $book --mutt-query "$@" \ | sed -e '1d;s/$/ abook/' fi done fi } lbdb-0.38ubuntu1/m_yppasswd.sh.in0000664000000000000000000000236710330705653013724 0ustar #! @SH@ # # -*-sh-mode-*- # # Copyright (C) 2000 Ross Campbell # Copyright (C) 2000-2005 Roland Rosenfeld # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software Foundation, # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,, USA. # # $Id: m_yppasswd.sh.in,v 1.5 2005-10-29 14:48:11 roland Exp $ m_yppasswd_query() { YPCAT=@YPCAT@ if [ -x "$YPCAT" ] #check for ypcat then f_user="`echo \"$@\" | sed -e 's/@.*//'`" HOST="`lbdb_hostname`" $YPCAT passwd \ | grep -ia "$f_user" \ | sed -e "s/^\([^:]*\):[^:]*:\([^:]*\):[^:]*:\([^:,]*\)[,:].*\$/\1@$HOST \3 UID \2/" fi } lbdb-0.38ubuntu1/mutt_ldap_query.ChangeLog0000664000000000000000000000257207245225343015566 0ustar * 4.0 (02/16/2001): - external configuration capability through a resource file has now be added - more flexibility in the specification of the format of the output is possible through a variable container approach - mutt_ldap_query is exclusively based on perl_ldap module (no longer supports ldapsearch) - Getopt::Long is used for the options: everything has changed - documentation is embedded using POD * 3.3 (02/15/2001): - fixed typo in server_db (pointed out by dpelle@cisco.com) - added "ignorant" option: -i to search with wildcards * 3.2 (01/12/2000): - now use get_value intead of ->[0] * 3.1 (03/10/2000): - added the -l option that suppresses the number of matches output - for better interfacing with little brother database - http://www.spinnaker.de/lbdb/ * 3.0 (12/29/1999): - implemented another query method using perl-ldap module enabled by - the -p boolean flag * 2.3 (12/28/1999): - added better parsing of the options, a shortcut for avoiding - -s and -b options by using the script builtin table of common - servers and associated search bases performing a - lookup (changes inspired from a patch sent by Adrian Likins - ), performed some Y2K cleanups ;-) * 2.2 (11/02/1999): - merged perl style fixes proposed by Warren Jones * 2.1 (4/14/1998): - first public release lbdb-0.38ubuntu1/m_finger.sh.in0000664000000000000000000000315511214161326013313 0ustar #! @SH@ # -*-sh-mode-*- # Copyright (C) 1998 Thomas Roessler # Copyright (C) 2005 Roland Rosenfeld # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software Foundation, # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,, USA. # $Id: m_finger.sh.in,v 1.10 2009-06-11 10:56:22 roland Exp $ m_finger_query() { FINGER=@FINGER@ if [ -x "$FINGER" ] # check whether finger in installed then f_user="`echo \"$@\" | sed 's/@.*//'`" if test "x$M_FINGER_HOSTS" = x ; then M_FINGER_HOSTS="localhost" fi for host in $M_FINGER_HOSTS ; do if test "$host" = "localhost" ; then athost="" mailhost="`lbdb_hostname`" else athost="@$host" mailhost="$host" fi $FINGER $f_user$athost 2> /dev/null \ | sed -n -e "s/^Login: *\([^ ]*\)[ ]*Name: \(.*\)$/\1@$mailhost \2 (finger)/p" \ -e "s/^Login name: *\([^ ]*\)[ ]*In real life: \(.*\)$/\1@$mailhost \2 (finger)/p" \ | grep -av 'In real life: ???' || : done fi } lbdb-0.38ubuntu1/ABQuery/0000775000000000000000000000000011601371461012073 5ustar lbdb-0.38ubuntu1/ABQuery/ABQuery.m0000664000000000000000000000565510330705660013574 0ustar /* ABQuery * * Copyright 2003 Brendan Cully * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,, USA. * * * $Id: ABQuery.m,v 1.3 2005-10-29 14:48:16 roland Exp $ */ #import #import int main (int argc, const char *argv[]) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; ABAddressBook *book = [ABAddressBook sharedAddressBook]; ABSearchElement *firstNameSearch, *lastNameSearch, *emailSearch, *search; NSArray *searchTerms; NSArray *results; NSEnumerator *addressEnum; ABPerson *person; NSString *key = [NSString stringWithCString:argv[1]]; firstNameSearch = [ABPerson searchElementForProperty:kABFirstNameProperty label:nil key:nil value:key comparison:kABContainsSubStringCaseInsensitive]; lastNameSearch = [ABPerson searchElementForProperty:kABLastNameProperty label:nil key:nil value:key comparison:kABContainsSubStringCaseInsensitive]; emailSearch = [ABPerson searchElementForProperty:kABEmailProperty label:nil key:nil value:key comparison:kABContainsSubStringCaseInsensitive]; searchTerms = [NSArray arrayWithObjects:firstNameSearch, lastNameSearch, emailSearch, nil]; search = [ABSearchElement searchElementForConjunction:kABSearchOr children:searchTerms]; results = [book recordsMatchingSearchElement:search]; addressEnum = [results objectEnumerator]; while (person = (ABPerson*)[addressEnum nextObject]) { NSString *fullName = [NSString stringWithFormat:@"%@ %@", [[person valueForProperty:kABFirstNameProperty] description], [[person valueForProperty:kABLastNameProperty] description]]; ABMultiValue *emails = [person valueForProperty:kABEmailProperty]; int count = [emails count]; int i; for (i = 0; i < count; i++) { NSString *email = [emails valueAtIndex:i]; printf("%s\t%s\t(AddressBook)\n", [email cString], [fullName UTF8String]); } } [pool release]; return 0; } lbdb-0.38ubuntu1/ABQuery/ABQuery_Prefix.h0000664000000000000000000000023407630442547015103 0ustar // // Prefix header for all source files of the 'ABQuery' target in the 'ABQuery' project. // #ifdef __OBJC__ #import #endif lbdb-0.38ubuntu1/ABQuery/ABQuery.pbproj/0000775000000000000000000000000011601371461014676 5ustar lbdb-0.38ubuntu1/ABQuery/ABQuery.pbproj/project.pbxproj0000664000000000000000000001202407701514502017752 0ustar // !$*UTF8*$! { archiveVersion = 1; classes = { }; objectVersion = 38; objects = { 014CEA4F0018CE4811CA2923 = { buildRules = ( ); buildSettings = { COPY_PHASE_STRIP = NO; OPTIMIZATION_CFLAGS = "-O0"; }; isa = PBXBuildStyle; name = Development; }; 014CEA500018CE4811CA2923 = { buildRules = ( ); buildSettings = { COPY_PHASE_STRIP = YES; }; isa = PBXBuildStyle; name = Deployment; }; //010 //011 //012 //013 //014 //030 //031 //032 //033 //034 034768E6FF38A76511DB9C8B = { isa = PBXExecutableFileReference; path = ABQuery; refType = 3; }; //030 //031 //032 //033 //034 //080 //081 //082 //083 //084 08FB7793FE84155DC02AAC07 = { buildStyles = ( 014CEA4F0018CE4811CA2923, 014CEA500018CE4811CA2923, ); hasScannedForEncodings = 1; isa = PBXProject; mainGroup = 08FB7794FE84155DC02AAC07; projectDirPath = ""; targets = ( 08FB779FFE84155DC02AAC07, ); }; 08FB7794FE84155DC02AAC07 = { children = ( 08FB7795FE84155DC02AAC07, C6859EA2029092E104C91782, 08FB779DFE84155DC02AAC07, 1AB674ADFE9D54B511CA2CBB, ); isa = PBXGroup; name = ABQuery; refType = 4; }; 08FB7795FE84155DC02AAC07 = { children = ( 32A70AAB03705E1F00C91783, 08FB7796FE84155DC02AAC07, ); isa = PBXGroup; name = Source; refType = 4; }; 08FB7796FE84155DC02AAC07 = { fileEncoding = 4; isa = PBXFileReference; path = ABQuery.m; refType = 4; }; 08FB779DFE84155DC02AAC07 = { children = ( 08FB779EFE84155DC02AAC07, C6B583C60405C207001D6ECE, ); isa = PBXGroup; name = "External Frameworks and Libraries"; refType = 4; }; 08FB779EFE84155DC02AAC07 = { isa = PBXFrameworkReference; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; refType = 0; }; 08FB779FFE84155DC02AAC07 = { buildPhases = ( 08FB77A0FE84155DC02AAC07, 08FB77A1FE84155DC02AAC07, 08FB77A3FE84155DC02AAC07, 08FB77A5FE84155DC02AAC07, C6859EA4029092FD04C91782, ); buildSettings = { FRAMEWORK_SEARCH_PATHS = ""; HEADER_SEARCH_PATHS = ""; INSTALL_PATH = "$(HOME)/bin"; LIBRARY_SEARCH_PATHS = ""; OTHER_CFLAGS = ""; OTHER_LDFLAGS = ""; OTHER_REZFLAGS = ""; PRECOMPILE_PREFIX_HEADER = YES; PREFIX_HEADER = ABQuery_Prefix.h; PRODUCT_NAME = ABQuery; REZ_EXECUTABLE = YES; SECTORDER_FLAGS = ""; WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas"; }; dependencies = ( ); isa = PBXToolTarget; name = ABQuery; productInstallPath = "$(HOME)/bin"; productName = ABQuery; productReference = 034768E6FF38A76511DB9C8B; }; 08FB77A0FE84155DC02AAC07 = { buildActionMask = 2147483647; files = ( 32A70AAC03705E1F00C91783, ); isa = PBXHeadersBuildPhase; runOnlyForDeploymentPostprocessing = 0; }; 08FB77A1FE84155DC02AAC07 = { buildActionMask = 2147483647; files = ( 08FB77A2FE84155DC02AAC07, ); isa = PBXSourcesBuildPhase; runOnlyForDeploymentPostprocessing = 0; }; 08FB77A2FE84155DC02AAC07 = { fileRef = 08FB7796FE84155DC02AAC07; isa = PBXBuildFile; settings = { ATTRIBUTES = ( ); }; }; 08FB77A3FE84155DC02AAC07 = { buildActionMask = 2147483647; files = ( 08FB77A4FE84155DC02AAC07, C6B583C70405C207001D6ECE, ); isa = PBXFrameworksBuildPhase; runOnlyForDeploymentPostprocessing = 0; }; 08FB77A4FE84155DC02AAC07 = { fileRef = 08FB779EFE84155DC02AAC07; isa = PBXBuildFile; settings = { }; }; 08FB77A5FE84155DC02AAC07 = { buildActionMask = 2147483647; files = ( ); isa = PBXRezBuildPhase; runOnlyForDeploymentPostprocessing = 0; }; //080 //081 //082 //083 //084 //1A0 //1A1 //1A2 //1A3 //1A4 1AB674ADFE9D54B511CA2CBB = { children = ( 034768E6FF38A76511DB9C8B, ); isa = PBXGroup; name = Products; refType = 4; }; //1A0 //1A1 //1A2 //1A3 //1A4 //320 //321 //322 //323 //324 32A70AAB03705E1F00C91783 = { fileEncoding = 4; isa = PBXFileReference; path = ABQuery_Prefix.h; refType = 4; }; 32A70AAC03705E1F00C91783 = { fileRef = 32A70AAB03705E1F00C91783; isa = PBXBuildFile; settings = { }; }; //320 //321 //322 //323 //324 //C60 //C61 //C62 //C63 //C64 C6859EA2029092E104C91782 = { children = ( ); isa = PBXGroup; name = Documentation; refType = 4; }; C6859EA4029092FD04C91782 = { buildActionMask = 8; dstPath = /usr/share/man/man1/; dstSubfolderSpec = 0; files = ( C6B583DD0405DFD5001D6ECE, ); isa = PBXCopyFilesBuildPhase; runOnlyForDeploymentPostprocessing = 1; }; C6B583C60405C207001D6ECE = { isa = PBXFrameworkReference; name = AddressBook.framework; path = /System/Library/Frameworks/AddressBook.framework; refType = 0; }; C6B583C70405C207001D6ECE = { fileRef = C6B583C60405C207001D6ECE; isa = PBXBuildFile; settings = { }; }; C6B583DD0405DFD5001D6ECE = { fileRef = 034768E6FF38A76511DB9C8B; isa = PBXBuildFile; settings = { }; }; }; rootObject = 08FB7793FE84155DC02AAC07; } lbdb-0.38ubuntu1/m_nispasswd.sh.in0000664000000000000000000000247510330705652014064 0ustar #! @SH@ # # -*-sh-mode-*- # # Copyright (C) 2000 Ross Campbell # Copyright (C) 2000-2005 Roland Rosenfeld # Copyright (C) 2001 Utz-Uwe Haus # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software Foundation, # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,, USA. # # $Id: m_nispasswd.sh.in,v 1.4 2005-10-29 14:48:10 roland Exp $ m_nispasswd_query() { NISCAT=@NISCAT@ if [ -x "$NISCAT" ] #check for niscat then f_user="`echo \"$@\" | sed -e 's/@.*//'`" HOST="`lbdb_hostname`" $NISCAT passwd.org_dir \ | grep -ia "$f_user" \ | sed -e "s/^\([^:]*\):[^:]*:\([^:]*\):[^:]*:\([^:,]*\)[,:].*\$/\1@$HOST \3 UID \2/" fi } lbdb-0.38ubuntu1/nodelist2lbdb.pl.in0000664000000000000000000000573010330705653014263 0ustar #! @PERL@ # # -*-perl-*- # # $Id: nodelist2lbdb.pl.in,v 1.3 2005-10-29 14:48:11 roland Exp $ # # This little script reads Fido nodelist.XXX (and points24.YYY) in and # generates a list with the following format from it: # TAB TAB # To reduce the size of the generated list, only Region 24 of the # nodelist is used. # # The generated list can be used in combination of Thomas Roessler's # lbdb for the Mutt mailreader. # ########################################################################## # # Copyright (C) 1998-2005 Roland Rosenfeld # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software Foundation, # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,, USA. # ########################################################################## $database="$ENV{HOME}/.lbdb/nodelist"; if (@ARGV == 0 || @ARGV >2 || !($ARGV[0] =~ /nodelist\.\d\d\d$/i) || ((@ARGV == 2) && !($ARGV[1] =~ /points24\.\d\d\d$/i ))) { die "Usage: $0 nodelist.XXX [points24.YYY]\n"; } open (DB, ">$database") || die "Cannot open $database for writing"; # # Process Nodelist: # $zone=2; $net=0; $node=0; open (NODELIST, "<$ARGV[0]") || die "Cannot open $ARGV[0]"; while () { next if /^;/; ($special,$number,$bbs,$city,$name) = split(/,/); if ($special =~ /Zone/) { $zone=$number; $net=$number; $node=0; } elsif ($special =~ /Region/) { $net=$number; $node=0; } elsif ($special =~ /Host/) { $net=$number; $node=0; } elsif ($special =~ /Down|Hold/) { next; } else { $node = $number; } $address = "$name\@f$node.n$net.z$zone.fidonet.org"; $name =~ s/_/ /g; $bbs =~ s/_/ /g; # # Restrict to Region 24: # # if ($zone =~ /^2$/ && $net =~ /^24/ ) { print DB "$address\t$name\t$bbs\n"; # } } close NODELIST; # # Process Pointlist: # $zone=2; $net=0; $node=0; $point=0; open (POINTLIST, "<$ARGV[1]") || die "Cannot open $ARGV[1]"; while () { next if /^;/; ($special,$number,$bbs,$city,$name) = split(/,/); if ($special =~ /Region/) { next; } elsif ($special =~ /Host/) { ($net,$node) = split(/\//, $bbs); next; } elsif ($special =~ /Down|Hold/) { next; } else { $point = $number; } $address = "$name\@p$point.f$node.n$net.z$zone.fidonet.org"; $name =~ s/_/ /g; $city =~ s/_/ /g; print DB "$address\t$name\t$city\n"; } close NODELIST; close DB; lbdb-0.38ubuntu1/m_pgp2.sh.in0000775000000000000000000000225410330705652012717 0ustar #! @SH@ # # -*-sh-*- # # Copyright (C) 1998-2005 Roland Rosenfeld # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software Foundation, # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,, USA. # # $Id: m_pgp2.sh.in,v 1.11 2005-10-29 14:48:10 roland Exp $ # m_pgp2_query() { PGP=@PGP@ if [ -x "$PGP" ] then $PGP +language=en -kv "$@" 2>/dev/null \ | grep -a '^[^<>]\{32,\} <[^<>@:/ ]*@[^<>@ ]*>[^<>@]*$' \ | sed -e 's/^.\{30,30\}\(.*\) <\([^:]*\)>.*$/\2 \1 (PGP2)/' \ | sed -e 's/ \([^ ]\{27,27\}\)[^ ]* / \1... /' fi } lbdb-0.38ubuntu1/lbdb.sl0000664000000000000000000000431106624344754012043 0ustar % % Query the little brother's database from within jed. % % activate this by adding the following line to your ~/.jedrc: % autoload ("lbdbq", "/some/path/to/your/jedfiles/lbdb"); % % Then you can use it by entering "M-x lbdbq" (or bind it on some key) % % Thomas Roessler % Mon Jul 27 23:27:57 MEST 1998 % variable lbdb_buf = "*lbdb*"; variable num_win; variable buf; variable old_buf; !if (keymap_p(lbdb_buf)) make_keymap(lbdb_buf); definekey ("lbdb_select", "\r", lbdb_buf); definekey ("lbdb_quit", "q", lbdb_buf); definekey ("next_line_cmd", "j", lbdb_buf); definekey ("previous_line_cmd", "k", lbdb_buf); define lbdb_select_str() { if(not(bolp())) go_left_1(); while(1) { if(looking_at_char(',')) break; if(looking_at_char(' ')) break; if(looking_at_char('\t')) break; if(bolp()) break; go_left_1(); } if(looking_at_char(',') or looking_at_char(' ') or looking_at_char('\t')) go_right_1(); push_mark(); while(1) { if(looking_at_char(',')) break; if(looking_at_char(' ')) break; if(looking_at_char('\t')) break; if(eolp()) break; go_right_1(); } } define lbdb_quit() { sw2buf(old_buf); pop2buf(buf); if(num_win == 1) onewindow(); delbuf(lbdb_buf); } define lbdb_select() { variable addr; bol(); push_mark_eol(); addr = bufsubstr(); lbdb_quit(); lbdb_select_str(); del_region(); insert(addr); } define lbdbq() { variable query; variable file, flags; buf = whatbuf(); push_spot(); lbdb_select_str(); query = bufsubstr(); pop_spot(); sw2buf(lbdb_buf); (file,,flags) = getbuf_info(); setbuf_info(file, query, lbdb_buf, flags); set_readonly(0); erase_buffer(); use_keymap(lbdb_buf); set_mode("lbdb", 0); shell_cmd(Sprintf("lbdbq \"%s\" | awk -F ' ' '{printf(\"%%s <%%s>\\n\", $2, $1);}' 2> err", query, 1)); bob(); push_mark_eol(); del_region(); del(); set_buffer_modified_flag(0); set_readonly(1); num_win = nwindows(); pop2buf(buf); old_buf = pop2buf_whatbuf(lbdb_buf); if(eobp()) { message("No matches."); lbdb_quit(); return; } eob(); go_up_1(); bol(); if(bobp()) { lbdb_select(); return; } else bob(); } lbdb-0.38ubuntu1/m_gpg.sh.in0000664000000000000000000000300111214161326012604 0ustar #! @SH@ # # -*-sh-*- # # Copyright (C) 1998-2005 Roland Rosenfeld # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software Foundation, # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,, USA. # # $Id: m_gpg.sh.in,v 1.26 2009-06-11 10:56:22 roland Exp $ # m_gpg_query() { GPG=@GPG@ if [ -x "$GPG" ] then $GPG --list-keys --with-colons "$@" 2>/dev/null \ | grep -a '^\(pub\|uid\):[^re]:\([^:]*:\)\{7,7\}[^<>:]* <[^<>@: ]*@[^<>@: ]*>[^<>@:]*:' \ | sed -e 's/^\([^:]*:\)\{9,9\}\([^<:]*\) <\([^>:]*\)>.*:.*$/\3 \2 (GnuPG)/' \ | sed -e 's/ \([^ ]\{27,27\}\)[^ ]* / \1... /' \ | grep -ia "$@" || : # $GPG --list-keys --no-greeting "$@" 2>/dev/null \ # | grep -a '^\(pub\|uid\) .\{25,25\} [^<>]* <[^<>@ ]*@[^<>@ ]*>' \ # | sed -e 's/^.\{24,31\}\([^<]*\) <\([^>]*\)>.*$/\2 \1 (GnuPG)/' \ # | sed -e 's/ \([^ ]\{27,27\}\)[^ ]* / \1... /' \ # | grep -ia "$@" fi } lbdb-0.38ubuntu1/debian/0000775000000000000000000000000012225513130011777 5ustar lbdb-0.38ubuntu1/debian/source/0000775000000000000000000000000011601371461013305 5ustar lbdb-0.38ubuntu1/debian/source/format0000664000000000000000000000000411601367700014513 0ustar 1.0 lbdb-0.38ubuntu1/debian/changelog0000664000000000000000000007631412225513117013671 0ustar lbdb (0.38ubuntu1) saucy; urgency=low * Use dh_autotools-dev to update config.{sub,guess} for AArch64. -- Matthias Klose Thu, 10 Oct 2013 13:57:49 +0200 lbdb (0.38build1) quantal; urgency=low * Rebuild for new armel compiler default of ARMv5t. -- Colin Watson Thu, 04 Oct 2012 13:11:51 +0100 lbdb (0.38) unstable; urgency=low * m_evolution: Try to evaluate the location of evolution-addressbook-export at runtime, since it is no longer available in /usr/bin since evolution 2.30.1.2-3 (Closes: #583851, #598380). * m_vcf: Apply patch by Jamey Sharp to support VCF contacts without real name (Closes: #624590). * vcquery: Apply patch by martin f krafft to search in NICKNAME field, too. (Closes: #586300). * Add debian/source/format (1.0). * Upgrade to Standards-Version 3.9.2: - Add line break to Suggests. * Remove "the" from description synopsis to make lintian happy. * Fix some typos in changelog. -- Roland Rosenfeld Sat, 25 Jun 2011 16:39:11 +0200 lbdb (0.37+nmu1) unstable; urgency=low * Non-maintainer upload. * Build-Depend on libvformat-dev instead of libvformat1-dev (Closes: #583073). -- Thomas Preud'homme Sun, 05 Jun 2011 21:03:08 +0200 lbdb (0.37) unstable; urgency=low * Fix bashisms in m_bbdb (Closes: #530113). * Fix query shell functions to catch non-zero exit status in case they get invoked in set -e context. Thanks to martin f. krafft for providing a patch (Closes: #515076). * m_evolution: support line breaks and long lines. Thanks to Jan Larres for providing a patch (Closes: #505540). * Fix documentation concerning the quotes on lbdbq call (Closes: #542012). * Upgrade to Standards-Version 3.8.4 (no changes). -- Roland Rosenfeld Tue, 18 May 2010 20:03:18 +0200 lbdb (0.36) unstable; urgency=low * Remove duplicate "See also: mutt" from lbdbq.man (Closes: #441588). * Update configure using autconf 2.61. * Apply charset conversation patch by Peter Colberg based on code by Tobias Schlemmer (Closes: #355678). * Remove duplicate declaration of $ignorant (Closes: #480356, #483701). * Handle mail addresses in mutt_ldap_query correct. Thanks to Colin Watson for providing a patch (Closes: #469288). * Mention ldapi URIs in mutt_ldap_query man page (Closes: #422730). * Protect "make distclean" by checking whether makefile exists. * Upgrade to Standards-Version 3.8.0: - Fix Homepage header in control file. * Add copyright holders to debian/copyright file. * Remove outdated override.Lintian. -- Roland Rosenfeld Sat, 14 Jun 2008 12:39:06 +0200 lbdb (0.35.1+nmu1) unstable; urgency=low * Non-maintainer upload. * Fix m_evolution to work also with recent Evolution which exports cards with different FN/EMAIL fields ordering. Thanks to Brian M. Carlson for the patch (Closes: #462573). -- Stefano Zacchiroli Sat, 12 Apr 2008 17:44:04 +0200 lbdb (0.35.1) unstable; urgency=low * New mail address of Brian Salter-Duke . * Get rid of the SSL code from the previous version and add a comment to the man page instead how you can use SSL (and also different ports) using ldap[s]://foo[:port] URLs (Closes: #426316). -- Roland Rosenfeld Mon, 28 May 2007 11:03:22 +0200 lbdb (0.35) unstable; urgency=low * activate flavortest in emacen-install to avoid warnings and slow upgrades (Closes: #399775). * Avoid loosing the first entry from VCF file. Thanks to Tino Keitel for providing a patch (Closes: #405312). * Remove vcquery in distclean target (Closes: #405321). * Use defaults for $KEEP_DUPES and $SORT_OUTPUT in lbdbq (Closes: #422214). * Update mutt_ldap_query.pl from http://www.courville.org/mediawiki/index.php/Mutt_ldap_query which adds SSL support. -- Roland Rosenfeld Sun, 20 May 2007 15:10:26 +0200 lbdb (0.34) unstable; urgency=medium * vcquery: avoid free() on unallocated memory if fullname is not set. Thanks to Gregor Jasny for finding and providing a patch (Closes: #395421). * vcquery: Use value of concatenated N fields if FN field is missing. Thanks to Gregor Jasny for providing a patch (Closes: #395422). -- Roland Rosenfeld Sun, 12 Nov 2006 13:09:16 +0100 lbdb (0.33) unstable; urgency=low * Add SORT_OUTPUT=reverse_comment to do reverse sort by the third column (most recent m_inmail timestamp at the top). Thanks to Marco d'Itri for this suggestion. * Comment out LDAP_NICKS in lbdb.rc because this should only be an example and if it is set there it overrides other LDAP settings (Closes: #391320). -- Roland Rosenfeld Sat, 14 Oct 2006 14:10:03 +0200 lbdb (0.32) unstable; urgency=low * Change sort(1) syntax to cope with new versions of coreutils (Closes: #368917). * New version of mutt_ldap_query by Marc de Courville and other contributors. * Extend lbdb_hostname() to get the domain name from resolv.conf. Thanks to Gary Johnson for providing this patch. * m_muttalias: Allow \"...\" around real names of aliases. Thanks to Erik Shirokoff for providing this patch. * Upgrade to Standards-Version 3.7.2 (no changes). * Upgrade to debhelper (>= 5) -- Roland Rosenfeld Sun, 13 Aug 2006 11:13:54 +0200 lbdb (0.31.1) unstable; urgency=low * Since evolution 2.2.3-2 (2005-08-01) there exists a symlink /usr/bin/evolution-addressbook-export. This package is now in testing (etch), so m_evolution is changed to access this program via the symlink to avoid trouble with various places of e-a-e. * It seems, that evolution-addressbook-export now also has EMAIL entries without subtype "EMAIL;TYPE=INTERNET:" vs. "EMAIL:" in it. m_evolution now supports both variants (Closes: #347971). * Remove backslash from comment in m_evolution. -- Roland Rosenfeld Sun, 15 Jan 2006 15:26:49 +0100 lbdb (0.31) unstable; urgency=low * m_pine: Double-quote parentheses. Thanks to Stefan Mätje for reporting this bug and sending a patch. * Apply patch by Brendan Cully to follow the Apple build system changes used to build ABQuery module. * Add m_vcf module for querying vcard files provided by Brendan Cully. * Add authentication (bind_dn, bind_password) to mutt_ldap_query. Based on an idea of Jan-Benedict Glaw (Closes: #324655, #286163). * Update FSF address in nearly all files. * Upgrade to standards-version 3.6.2 (no changes). -- Roland Rosenfeld Sat, 29 Oct 2005 16:49:58 +0200 lbdb (0.30) unstable; urgency=low * Get rid of strict aliasing warnings in gcc. Thanks to Ludwig Nussel for providing a patch. * Add line breaks to POD part of mutt_ldap_query.pl to make man page more readable. * Replace "grep" with "grep -a" to avoid error messages on non-ascii output (Closes: #284119). * Search for evolution-addressbook-export in /usr/lib/evolution/2.0, where it is located in sarge and newer (Closes: #286795). * mutt_ldap_query: Stop returning entries without email address (Closes: #290148). * m_gpg: Add support for gpg 1.4 (not only 1.2.5) (Closes: #294113). * m_gpg: Stop showing revoked user ids (Closes: #259212). * Rebuild configure with autoconf 2.59a. * Make the paths of several binaries configurable in configure as --with-foo * Replace hyphens (-) by minus signs (\-) in the man pages. -- Roland Rosenfeld Sat, 30 Apr 2005 21:40:04 +0200 lbdb (0.29) unstable; urgency=low * Add new module m_evolution to access Ximian Evolution addressbook. Thanks to Guido Guenther (Closes: #234345). -- Roland Rosenfeld Mon, 23 Feb 2004 12:39:42 +0100 lbdb (0.28.2) unstable; urgency=low * Another upgrade of m_bbdb by Aaron Kaplan . * Add homepage URL to the package description. * Quote $GNUCLIENT in m_bbdb to avoid error message when this variable is not defined (Closes: #231061). * mutt_ldap_query: Apply patch from Max Kutny , which allows to override config file settings via command line options (Closes: #231261). -- Roland Rosenfeld Sat, 7 Feb 2004 14:00:12 +0100 lbdb (0.28.1) unstable; urgency=low * Make m_osx_addressbook compile on MacOS 10.3 and XCode, too. Thanks to Yuval Kogman and Brendan Cully for the patch. * Remove "set -e" from lbdbq, which causes trouble if grep doesn't find a match in some of the modules (Closes: #222647). * m_passwd: Ignore system accounts (UIDs, which aren't in the range 1000-29999 on a Debian system), if PASSWD_IGNORESYS=true is set (Closes: #188085). * Allow sorting the output by "comment" field (column 3) by setting SORT_OUTPUT=comment (Closes: #225104). * Add gnuclient support to m_bbdb module. Thanks to Aaron Kaplan for providing this patch. -- Roland Rosenfeld Sun, 18 Jan 2004 14:59:38 +0100 lbdb (0.28) unstable; urgency=low * Fix bug in ABQuery module, which crashes when it finds results in non-latin character sets. Now returns UTF8 results instead. Thanks to Brendan Cully . * Correct delimiter of vcard to END:VCARD in m_gnomecard and allow encodings etc. in the FN field, thanks to Rogerio Brito (Closes: #198633). * Search for .gnome/GnomeCard.gcd in $HOME instead of current directory. * m_abook: Search for $HOME/.abook/addressbook in addition to $HOME/.abook.addressbook to honor the fact that this file was moved in abook 0.5 (Closes: #205418). * Add a new version of mutt_ldap_query.pl by Marc de Courville: - activated pod2usage (now contained in all the decent distributions) - cleaned pod section to comply better with the pod formatting standard - change contact address - fixed typos * m_palm: Use only "email" entries as e-mail addresses and not everything including "@". Thanks to Nikolaus Rath for providing the patch (Closes: #196888). * Upgrade to Standards-Version 3.6.1 (no changes). -- Roland Rosenfeld Tue, 9 Sep 2003 19:49:20 +0200 lbdb (0.27) unstable; urgency=low * New module m_osx_addressbook, which queries the OS X AddressBook (only on OS X with the Developer tools installed) written by Brendan Cully . * Fix description of m_nispasswd in debian/control (Closes: #185573). * Upgrade to Standards-Version 3.5.9 (no changes). * Add ${misc:Depends} to dependencies. -- Roland Rosenfeld Sat, 22 Mar 2003 16:02:20 +0100 lbdb (0.26.2) unstable; urgency=low * Optimized manual page in mutt_ldap_query.pl, to look less corrupted. * mutt_ldap_query: Add new config option $ignorant (and also 7th field in NICK array) to enable ignorant searching (search for *foo* instead of foo) (Closes: #179861). -- Roland Rosenfeld Sun, 9 Feb 2003 13:19:49 +0100 lbdb (0.26.1) unstable; urgency=low * Rebuild configure with autoconf 2.57. * Add long options --version and --help to ldbdq and man page. * Support multiple address book files with abook. Thanks to Etienne PIERRE for providing this patch. * New mail address of Brian Salter-Duke . * Upgrade to Standards-Version 3.5.8 (handling of compiler optimization in DEB_BUILD_OPTIONS changed). * Upgrade to debhelper 4. * Remove dependency on awk, which is essential, to make lintian happy. * Use /etc/mailname as mail domain name in lbdb_hostname() (Closes: #165159). -- Roland Rosenfeld Sat, 8 Feb 2003 18:28:36 +0100 lbdb (0.26) unstable; urgency=low * m_finger: Suppress lines where real name is '???' (some versions of finger seem to use this for non existing users) (Closes: #112127). * m_wanderlust: new module to read ~/.addesses file from WanderLust MUA. Module provided by Gergely Nagy . (Closes: #133209). * Quote the search string in m_yppasswd, m_nispasswd and m_getent as mentioned by Gary Johnson . * Add CVS Id tags to all modules. -- Roland Rosenfeld Mon, 11 Feb 2002 20:23:42 +0100 lbdb (0.25.2) unstable; urgency=low * New version (1.10) of lbdb.el by Dave Pearson : Fixes the fact that, when in an emacs that doesn't have `line-{beginning,end}-position' available (xemacs, for example) I wasn't defining fully compatible versions. * Add short description to mutt_ldap_query in NAME section. * Add m_getent by Adrian Likins , which can replace m_passwd and m_yppasswd on systems where getent(1) is installed. * Add option -a to fetchaddr and lbdb-fetchaddr to fetch also addresses without realname. * Upgrade to Policy version 3.5.6 (no changes). * Use debhelper >= 2.2.0 - Use DH_COMPAT=3 instead of DH_COMPAT=2 - remove debian/conffiles, which is automatically generated by DH_COMPAT=3. - replace dh_installmanpages by dh_installman - dh_strip now knows about DEB_BUILD_OPTIONS=nostrip itself - activate dh_perl, because we also build perl scripts. - Add ${perl:Depends} to debian/control. -- Roland Rosenfeld Sat, 1 Sep 2001 13:09:58 +0200 lbdb (0.25.1) unstable; urgency=low * Add ">" to pod2man call in Makefile, because older versions of perl come with a pod2man which dies otherwise. -- Roland Rosenfeld Tue, 24 Jul 2001 17:47:16 +0200 lbdb (0.25) unstable; urgency=low * Suggest mutt-ja as an alternative to mutt, because mutt-ja currently does not provide mutt (Closes: #85923). * Add m_ldap and mutt_ldap_query provided by Marc de Courville, . * Fix problem in mutt_ldap_query, which ignored the content of the config file before. * Remove <> from email address in mutt_ldap_query output. * lbdb-munge didn't honor SORT_OUTPUT when called from m_inmail, so export this variable in m_inmail (Closes: #92767). * Module m_nispasswd added by Utz-Uwe Haus . * Added variable MAIL_DOMAIN_NAME to override other settings of mail domain. * Change Build-Dependency to debhelper >=2.0.103, which is needed for dh_installlogrotate (Closes: #94471). * Replace dh_testversion by versioned build-depends. * Upgrade to Standards-Version 3.5.2 (no changes). * Depend on mawk | awk to give apt a default. -- Roland Rosenfeld Sun, 22 Jul 2001 20:04:34 +0200 lbdb (0.24) unstable; urgency=low * Add new module m_bbdb to access a (X)Emacs big brother database (bbdb) from lbdb using (x)emacs as the backend. Thanks to Utz-Uwe Haus for providing this. * s/MODULE_PATH/MODULES_PATH/ in documentation to match the behavior of the program (Closes: #83933). * m_gpg: stop using --with-colons, because this outputs utf8 instead of your local charset, which causes problems with non 7bit characters (Closes: #83936). * Add a new variable KEEP_DUPES, which allows to see duplicate mail addresses (with different real names or comment fields) (Closes: #83908). -- Roland Rosenfeld Sat, 10 Feb 2001 17:57:54 +0100 lbdb (0.23) unstable; urgency=low * Add a second grep to m_pgp5 and m_gpg to remove UIDs, which don't match the search string, but are only generated, because a different UID of this key matches. * Add new module m_gnomecard based on an idea by Rick Frankel . * Always use /bin/sh as the shell on Debian systems, because Debian guarantees, that /bin/sh is a posix shell (Closes: #75475). * Move /usr/share/doc/lbdb/override.Lintian to /usr/share/lintian/overrides/lbdb. * Add $(install_prefix) to Makefile.in and change debian/rules to use it. Thanks to Rob Payne for providing the idea and a patch. * Update lbdb.spec.in, patch provided by Rob Payne . * Remove dh_suidregister from debian/rules. * Update Debian package description. * Upgrade lbdb.el to version 1.9 (Thanks Dave!). -- Roland Rosenfeld Tue, 23 Jan 2001 18:33:45 +0100 lbdb (0.22) unstable; urgency=low * Add new module m_addr_email to request data from addressbook program (http://red.roses.de/~clemens/addressbook/) by Torsten Jerzembeck . * Some optimizations on m_addr_email to handle city name correct and to junk entries without email address. * Update lbdb.el to version 1.8: - Fixes the problem with spaces in query strings (Closes: #74818). - New commands lbdb-region and lbdb-maybe-region to query lbdb for the content of the current region. - Autoload lbdb-region and lbdb-maybe-region from startup file. * Use sort without -u option, because duplicates are already removed by munge before. * Do not overwrite m_inmail.list on munging, if file system is full. -- Roland Rosenfeld Tue, 17 Oct 2000 17:59:07 +0200 lbdb (0.21.1) unstable; urgency=low * Update lbdb.el to version 1.4 to avoid problems with status line of lbdbq. * Correct behavior of variable SORT_OUTPUT (did the inverse of what it should do). * Correct output of number of matching entries (count after munging instead before). * SORT_OUTPUT now can be "name" or "address" to sort output by mail real names or addresses (still the default). -- Roland Rosenfeld Mon, 9 Oct 2000 12:05:28 +0200 lbdb (0.21) unstable; urgency=low * Don't fail in m_palm, if no database is available. * Update lbdb.el to version 1.3 (thanks Dave). * m_muttalias: Add support for "alias foo (Foo Bar)" style aliases. * Correct typo in m_muttalias, which stopped to work when your HOME is your MUTT_DIRECTORY (Closes: #71975). * Correct README (we have more than two modules now :-) * Create sysconfdir, if it doesn't already exist. * lbdbq: write information about number of matching entries into status line and exit with return value 1, if no matching entries were found. * Correct exit value of lbdbq (trap command). -- Roland Rosenfeld Sun, 8 Oct 2000 01:12:33 +0200 lbdb (0.20.1) unstable; urgency=low * Fix name conflicts (m_palm_lsaddr now completely renamed to palm_lsaddr). -- Roland Rosenfeld Thu, 24 Aug 2000 04:14:05 +0200 lbdb (0.20) unstable; urgency=low * Add emacs interface lbdb.el 1.2 by Dave Pearson and install it on Debian systems. * Add m_palm module and palm_lsaddr by Dave Pearson . * Update package description in debian/control file. * Update documentation. * Add override.Lintian to avoid warnings about missing Palm::PDB and Palm::Address, which are in libpalm-perl, that is suggested (we don't depend on it, because this is only used by the m_palm module). * Rename $p to $CURRENT_MODULE_DIR in lbdbq, so a module can access the directory where it is placed itself for accessing some helper applications. -- Roland Rosenfeld Mon, 21 Aug 2000 15:46:02 +0200 lbdb (0.19.9) unstable; urgency=low * Remove erroneous quotes from lbdb-fetchaddr, which caused fetchaddr to write "`' wrong parameter" error message to procmail log file. * Correct the getopt behavior in lbdb-fetchaddr. * s/strfcpy/strncpy/ in fetchaddr.c. -- Roland Rosenfeld Wed, 16 Aug 2000 13:45:47 +0200 lbdb (0.19.8) unstable; urgency=low * Renamed option -h to -x, because -h is already used for "help". -- Roland Rosenfeld Tue, 8 Aug 2000 19:04:07 +0200 lbdb (0.19.7) unstable; urgency=low * Add a new option -h to lbdb-fetchaddr and fetchaddr, which allows you to add a colon separated list of header fields to search for mail addresses. If this option isn't given, we fall back to "from:to:cc:resent-from:resent-to" (Closes: #54169). -- Roland Rosenfeld Mon, 7 Aug 2000 19:46:27 +0200 lbdb (0.19.6) unstable; urgency=low * New version of m_pine by Gabor Fleischer : Now handles aliases without real names correct (by using a single space as the realname, so Mutt has not problem with this. * Add new helper program qpto8bit, which converts quoted-printable (according to RFC2047) to plain 8bit (without MIME header). This is used by m_pine to decode quoted-printable in addressbooks to 8bit. * Upgrade to Standards-Version 3.2.0: - Evaluate DEB_BUILD_OPTIONS for -g and strip. * Upgrade to new debhepler: - Change to DH_COMPAT=2. - Add some dh_* calls to debian/rules. -- Roland Rosenfeld Sat, 5 Aug 2000 21:20:59 +0200 lbdb (0.19.5) unstable; urgency=low * Remove "-f" option from configure @AWK@ variable and manually add it, where it is needed, otherwise @AWK@ cannot be used for inline scripts. * Add new module m_pine, provided by Gabor FLEISCHER to search pine address books. * Fixed m_muttalias to additionally accept "foo@bar (Foo Bar)" style addresses and to ignore group aliases. -- Roland Rosenfeld Fri, 23 Jun 2000 12:09:32 +0200 lbdb (0.19.4) unstable; urgency=low * Make dotlock.c compile on systems without snprintf() again. * Don't remove Makefile in clean target but only in distclean. -- Roland Rosenfeld Sun, 28 May 2000 11:32:16 +0200 lbdb (0.19.3) unstable; urgency=low * Add new module m_muttalias, provided by Brian Salter-Duke to search mutt alias files for aliases. -- Roland Rosenfeld Sat, 27 May 2000 14:47:17 +0200 lbdb (0.19.2) unstable; urgency=low * Give the dateformat to fetchaddr(1) using the -d option (instead of simply using argv[1]). * Give the dateformat to lbdb-fetchaddr(1) using the -d option. If there is only one parameter, this is used as dateformat for backward compatibility. Manpage adapted to this. * Remove DOTLOCK=/usr/bin/mutt_dotlock from ./configure environment. This is superfluous since --enable-lbdb-dotlock is used, but it doesn't cause problems (neither with mutt installed or deinstalled) (Closes: #64134). * Fixed typo in m_abook ("@$" instead of "$@"). -- Roland Rosenfeld Mon, 22 May 2000 10:59:59 +0200 lbdb (0.19.1) unstable; urgency=low * Correct dependencies: - No longer depend on mutt (only suggest it), we use lbdb_dotlock now, so #58188 is really closed now. - Depend on awk instead of mawk, because we use /usr/bin/awk, which can be any awk. -- Roland Rosenfeld Wed, 10 May 2000 03:16:05 +0200 lbdb (0.19) unstable; urgency=low * Upgrade to standards version 3.1.1: Add Build-Depends. * Hardcode finger and mutt_dotlock in debian/rules, to avoid additional Build-Depends. * use safe_strdup() instead of strdup() which isn't available on Ultrix. * Add lbdb.spec by Horms . * Update the version number in lbdb.spec via configure. * Add abook support based on an idea by Ross Campbell . * Add NIS support based on an idea by Ross Campbell . * Add --enable-lbdb-dotlock to configure options to force using of lbdb_dotlock (instead of using mutt_dotlock) and use this option for the Debian package (Closes: #58188). * Update FSF address in copyrights. * Update dotlock code from mutt 1.1.12. * Use /usr/bin/awk instead of /usr/bin/mawk in the Debian package (/usr/bin/awk is handled by alternates mechanism to point to the "optimal" awk replacement). * Speed up munge (nearly two times as fast as previous version). * Add option SORT_OUTPUT to lbdb.rc, which can be set to "false" or "no". This implies that lbdbq doesn't sort the output but reverts its order, so the most recent addresses from m_inmail.list will be shown first. Thanks to Andrew Over for this idea. -- Roland Rosenfeld Mon, 8 May 2000 19:23:16 +0200 lbdb (0.18.5) unstable; urgency=low * Optimized m_gpg to use --with-colons. * Remove "Recommends: netstd" (Closes: #49397). * Add "Suggests: finger" and test in m_finger whether the finger command is available (don't do anything in m_finger, if finger isn't available). -- Roland Rosenfeld Sun, 7 Nov 1999 02:51:52 +0100 lbdb (0.18.4) unstable; urgency=low * Fixed typo in lbdb-fetchaddr.man. * Fixed typo on lbdbq.man (Closes: #48143). -- Roland Rosenfeld Sun, 24 Oct 1999 02:45:46 +0200 lbdb (0.18.3) unstable; urgency=low * m_gpg no longer writes error messages to stderr, when the given search string does not exist (Closes: #45422). -- Roland Rosenfeld Sat, 18 Sep 1999 20:40:02 +0200 lbdb (0.18.2) unstable; urgency=low * Added HP-UX support (by David Ellement ): - Try awk (in addition to mawk, gawk, nawk). - Don't use "if ! ..." in shell scripts, because ksh in HP-UX doesn't support this. * Make dotlock.c more portable. * Make Makefile.in much more portable. * Merge in changes of dotlock program from Mutt 0.96.6. * Upgraded Debian standards version to 3.0.1: - GPL now in /usr/share/common-licenses/ - /usr/man -> /usr/share/man * Add -v and -h options to lbdbq and lbdb-fetchaddr which display the version of lbdb and a short help. -- Roland Rosenfeld Wed, 15 Sep 1999 11:42:19 +0200 lbdb (0.18.1) unstable; urgency=low * Always build Debian binary with m_pgp2, m_pgp5 and m_gpg (ignoring whether the different PGP binaries are installed). * Merged in changes from Mutt's dotlock (CVS as of 1999-08-01). * Use "$@" instead of $1 in m_* files to allow `lbdb First Last' without quotes around "First Last" (Closes: #42417). -- Roland Rosenfeld Wed, 4 Aug 1999 00:44:58 +0200 lbdb (0.18) unstable; urgency=low * Splited lbdb-fetchaddr.man off from lbdbq.man. * Moved lbdb-fetchaddr from $bindir to $libdir. * Added Fido module m_fido and nodelist2lbdb. -- Roland Rosenfeld Wed, 23 Jun 1999 18:22:53 +0200 lbdb (0.17.1) unstable; urgency=low * Upgraded autoconf from 2.12 to 2.13. Get rid of `echo $PATH | sed "s/:/ /g"` in AC_PATH_PROC() macro, because this isn't needed and doesn't work with autoconf 2.13. * Removed word boundary check in m_inmail, because this is only available in GNU grep. -- Roland Rosenfeld Tue, 25 May 1999 15:53:53 +0200 lbdb (0.17) unstable; urgency=low * Delay munging of mails when using lbdb-fetchaddr/m_inmail by adding a new script lbdb-munge, which is run by lbdbq and can be run by cron additionally. Thanks to Enrico Zini for the base idea of this. * Made lbdb-fetchaddr Y2K compliant by changing the date format which is written to the 3rd column of m_inmail.list to "%Y-%m-%d %H:%M" (e.g. "1999-04-29 14:33"). * Made date format in lbdb-fetchaddr runtime configurable as a command line parameter. If no date format is specified, "%Y-%m-%d %H:%M" is used as the default. * include getopt.h only if it is existing (using autoconf). -- Roland Rosenfeld Wed, 7 Apr 1999 12:22:13 +0200 lbdb (0.16.2) unstable; urgency=low * Removed some bash, GNU-make, and GNU libc specials. -- Roland Rosenfeld Tue, 6 Apr 1999 19:11:24 +0200 lbdb (0.16.1) unstable; urgency=low * lbdb-fetchaddr: Create directory $HOME/.lbdb if it does not exist. -- Roland Rosenfeld Mon, 5 Apr 1999 13:12:04 +0200 lbdb (0.16) unstable; urgency=low * Added dotlock command from mutt 0.96.1 sources (without the SGID mail stuff) which is installed as lbdb_dotlock, when no mutt_dotlock can be found. This doesn't change the Debian binary, because the Debian package depends on mutt which is compiled with mutt_dotlock in the Debian environment (because of "SGID mail") -- Roland Rosenfeld Sun, 4 Apr 1999 19:24:26 +0200 lbdb (0.15.1) unstable; urgency=low * m_passwd: give UID in comment field. * m_gpg: now only return addresses which match query. Closes #33672. -- Roland Rosenfeld Sun, 21 Feb 1999 18:55:45 +0100 lbdb (0.15) unstable; urgency=low * Added new modules: - m_passwd: looks into /etc/passwd for addresses - m_pgp2: scans your PGP 2.* keyring for addresses - m_pgp5: scans your PGP 5.* keyring for addresses - m_gpg: scans your GnuPG keyring for addresses * Made config directory autoconf configureable as @sysconfdir@ (this does not change anything for the Debian package). * Fixed trouble in configure.in noted by Fabrice Noilhan . -- Roland Rosenfeld Thu, 18 Feb 1999 16:49:48 +0100 lbdb (0.14.1) frozen unstable; urgency=low * Fixed wrong mawk path (/usr/bin//mawk instead of /usr/bin/mawk) created by broken development environment... -- Roland Rosenfeld Tue, 19 Jan 1999 19:03:44 +0100 lbdb (0.14) frozen unstable; urgency=low * fetchaddr converts the domain part of mail addresses to lowercase, to beware of duplicates in m_inmail.list. Closes #31989 -- Roland Rosenfeld Sat, 16 Jan 1999 21:21:40 +0100 lbdb (0.13) frozen unstable; urgency=low * Upgraded lbdb.sl supplied by Thomas Roessler * Moved lbdb.sl to /usr/doc/lbdb/examples * Removed dependency to mutt-i (>= 0.94.10), because there was no mutt-i >= 0.94.10, instead mutt-i was renamed to mutt in the time of adding the needed mutt_dotlock. * Create ~/.lbdb/m_inmail.list in lbdb-fetchaddr if it does not exist. * Fix manpage lbdb-fetchaddr(1) to refer to the correct db filename. -- Roland Rosenfeld Tue, 12 Jan 1999 00:09:36 +0100 lbdb (0.12) unstable; urgency=low * Debian maintainer took over the maintenance of the upstream packet. * lbdbq manpage moved to main packet. * made @libdir@ configurable in lbdbq manpage. * fixed some "-Wall" warnings. * several typos and nits fixed. -- Roland Rosenfeld Wed, 11 Nov 1998 21:30:33 +0100 lbdb (0.11-3) unstable; urgency=low * Fixed /tmp security problem (mkdir -p returns 0 on existing dir) -- Roland Rosenfeld Mon, 26 Oct 1998 17:33:25 +0100 lbdb (0.11-2) unstable; urgency=low * Fixed nits in manpage. * Changed date format in fetchaddr.c to yy-mm-dd HH:MM. -- Roland Rosenfeld Sun, 25 Oct 1998 12:51:54 +0100 lbdb (0.11-1) unstable; urgency=low * New upstream version. * jed mode lbdb.sl installed. -- Roland Rosenfeld Wed, 14 Oct 1998 17:46:25 +0200 lbdb (0.10-1) unstable; urgency=low * Initial Release. * Manpage added. * m_inmail database renamed. -- Roland Rosenfeld Mon, 12 Oct 1998 01:31:38 +0200 lbdb-0.38ubuntu1/debian/compat0000664000000000000000000000000210467566534013223 0ustar 5 lbdb-0.38ubuntu1/debian/copyright0000664000000000000000000000410011601361224013727 0ustar This package was debianized by Roland Rosenfeld on Sun, 11 Oct 1998 15:59:49 +0200. It was formerly downloaded from ftp://riemann.iam.uni-bonn.de/pub/users/roessler/lbdb-0.11.tgz At the moment upstream version and Debian version are identical and can be found at http://www.spinnaker.de/lbdb/ Upstream Author: Thomas Roessler Upstream Maintainer: Roland Rosenfeld Copyright: Copyright (C) 1998-2000 Thomas Roessler 1996-2000 Michael R. Elkins 2000-2001 Dave Pearson 2000-2001 Ross Campbell 2000 Torsten Jerzembeck 2000 Rick Frankel 2000 Brian Salter-Duke 2000 Gabor Fleischer 2000-2006 Marc de Courville 2001 Utz-Uwe Haus 2002 Gergely Nagy 2003 Aaron Kaplan 2003 Nikolaus Rath 2003-2005 Brendan Cully 2004 Guido Guenther 2008 brian m. carlson 1998-2011 Roland Rosenfeld This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. See /usr/share/common-licenses/GPL for the complete GNU General Public License. lbdb-0.38ubuntu1/debian/rules0000775000000000000000000000413012225513062013061 0ustar #!/usr/bin/make -f # (c) 1998-2011 Roland Rosenfeld # Sample debian/rules that uses debhelper. # This file is public domain software, originally written by Joey Hess. # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 DROOT=`pwd`/debian/lbdb OPTIMIZE= ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) OPTIMIZE=-O0 else OPTIMIZE=-O2 endif build: build-stamp build-stamp: dh_testdir dh_autotools-dev_updateconfig env SH=/bin/sh MAWK=/usr/bin/awk \ ./configure --prefix=/usr --libdir='$${prefix}/lib/lbdb' \ --mandir='$${prefix}/share/man' --sysconfdir=/etc \ --enable-lbdb-dotlock \ --with-finger=/usr/bin/finger \ --with-abook=/usr/bin/abook \ --with-addr-email=/usr/bin/addr-email \ --with-ypcat=/usr/bin/ypcat \ --with-getent=/usr/bin/getent \ --with-gpg=/usr/bin/gpg \ --with-pgpk=/usr/bin/pgpk \ --with-pgp=/usr/bin/pgp \ --with-evolution-addressbook-export=auto $(MAKE) CFLAGS="$(OPTIMIZE) -Wall -g" touch build-stamp clean: dh_testdir dh_testroot rm -f build-stamp [ ! -f Makefile ] || $(MAKE) distclean rm -f lbdb.spec dh_autotools-dev_restoreconfig dh_clean install: build dh_testdir dh_testroot dh_clean -k dh_installdirs $(MAKE) install_prefix=$(DROOT) install install -m644 -oroot -groot lbdb.el \ $(DROOT)/usr/share/emacs/site-lisp/lbdb/lbdb.el # Build architecture-independent files here. binary-indep: build install # We have nothing to do by default. # Build architecture-dependent files here. binary-arch: build install dh_testdir dh_testroot dh_installchangelogs dh_installdocs dh_installexamples # dh_install # dh_installmenu # dh_installdebconf # dh_installlogrotate dh_installemacsen # dh_installpam # dh_installmime # dh_installinit # dh_installcron # dh_installinfo # dh_undocumented dh_installman dh_link dh_strip dh_compress dh_fixperms # dh_makeshlibs dh_installdeb dh_perl dh_shlibdeps dh_gencontrol dh_md5sums dh_builddeb binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary install lbdb-0.38ubuntu1/debian/control0000664000000000000000000000320212225512775013415 0ustar Source: lbdb Section: mail Priority: optional Maintainer: Roland Rosenfeld Standards-Version: 3.9.2 Build-Depends: debhelper (>= 5), perl, libvformat-dev, autotools-dev Homepage: http://www.spinnaker.de/lbdb/ Package: lbdb Architecture: any Depends: ${shlibs:Depends}, ${perl:Depends}, ${misc:Depends} Suggests: mutt | mutt-ja, procmail, finger, abook, libpalm-perl, libnet-ldap-perl Description: Little Brother's DataBase for the mutt mail reader This package consists of a set of small tools, which collect mail addresses from several sources and offer these addresses to the mutt external query feature. At the moment the following modules are supported: - m_finger (uses the finger(1) command) - m_inmail (scans incoming mail for addresses) - m_passwd (searches /etc/passwd) - m_yppasswd (searches the YP password database) - m_nispasswd (searches the NIS password database) - m_getent (searches the configured password database) - m_pgp2, m_pgp5, m_gpg (searches your PGP or GnuPG keyrings) - m_fido (searches the Fidonet nodelist) - m_abook (uses the address book application abook(1)) - m_addr_email (uses addr-email from the addressbook Tk program) - m_muttalias (searches your Mutt mail aliases) - m_pine (searches your Pine addressbook files) - m_wanderlust (search the WanderLust alias database) - m_palm (uses your Palm database; needs libpalm-perl package) - m_gnomecard (uses GnomeCard database files) - m_bbdb (search your BBDB (big brother database)) - m_ldap (query some LDAP server) - m_evolution (search in the Evolution addressbook) - m_vcf (search in vcard files using libvformat) lbdb-0.38ubuntu1/debian/docs0000664000000000000000000000004607245527652012676 0ustar README TODO mutt_ldap_query.ChangeLog lbdb-0.38ubuntu1/debian/emacsen-remove0000664000000000000000000000071407150215374014644 0ustar #!/bin/sh -e # /usr/lib/emacsen-common/packages/remove/lbdb FLAVOR=$1 PACKAGE=lbdb if [ ${FLAVOR} != emacs ]; then # if test -x /usr/sbin/install-info-altdir; then # echo remove/${PACKAGE}: removing Info links for ${FLAVOR} # install-info-altdir --quiet --remove --dirname=${FLAVOR} /usr/info/lbdb.info.gz # fi echo remove/${PACKAGE}: purging byte-compiled files for ${FLAVOR} rm -rf /usr/share/${FLAVOR}/site-lisp/${PACKAGE} fi lbdb-0.38ubuntu1/debian/dirs0000664000000000000000000000004311024720027012661 0ustar etc usr/share/emacs/site-lisp/lbdb lbdb-0.38ubuntu1/debian/emacsen-install0000664000000000000000000000230710624042032015002 0ustar #! /bin/sh -e # /usr/lib/emacsen-common/packages/install/lbdb # Written by Jim Van Zandt , borrowing heavily # from the install scripts for gettext by Santiago Vila # and octave by Dirk Eddelbuettel . FLAVOR=$1 PACKAGE=lbdb if [ ${FLAVOR} = emacs ]; then exit 0; fi echo install/${PACKAGE}: Handling install for emacsen flavor ${FLAVOR} FLAVORTEST=`echo $FLAVOR | cut -c-6` if [ ${FLAVORTEST} = xemacs ] ; then SITEFLAG="-no-site-file" else SITEFLAG="--no-site-file" fi FLAGS="${SITEFLAG} -q -batch -l path.el -f batch-byte-compile" ELDIR=/usr/share/emacs/site-lisp/${PACKAGE} ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE} # Install-info-altdir does not actually exist. # Maybe somebody will write it. if test -x /usr/sbin/install-info-altdir; then echo install/${PACKAGE}: install Info links for ${FLAVOR} install-info-altdir --quiet --section "" "" --dirname=${FLAVOR} /usr/info/${PACKAGE}.info.gz fi install -m 755 -d ${ELCDIR} cd ${ELDIR} FILES=`echo *.el` cp ${FILES} ${ELCDIR} cd ${ELCDIR} cat << EOF > path.el (setq load-path (cons "." load-path) byte-compile-warnings nil) EOF ${FLAVOR} ${FLAGS} ${FILES} rm -f *.el path.el exit 0 lbdb-0.38ubuntu1/debian/examples0000664000000000000000000000001006646503171013545 0ustar lbdb.sl lbdb-0.38ubuntu1/debian/emacsen-startup0000664000000000000000000000175607621240554015061 0ustar ;; -*-emacs-lisp-*- ;; ;; Emacs startup file for the Debian GNU/Linux lbdb package ;; ;; Originally contributed by Nils Naumann ;; Modified by Dirk Eddelbuettel ;; Adapted for dh-make by Jim Van Zandt ;; The lbdb package follows the Debian/GNU Linux 'emacsen' policy and ;; byte-compiles its elisp files for each 'emacs flavor' (emacs19, ;; xemacs19, emacs20, xemacs20...). The compiled code is then ;; installed in a subdirectory of the respective site-lisp directory. ;; We have to add this to the load-path: (setq load-path (cons (concat "/usr/share/" (symbol-name flavor) "/site-lisp/lbdb") load-path)) (autoload 'lbdb "lbdb" "Interactively query the Little Brother's Database." t) (autoload 'lbdb-region "lbdb" "Look for the contents of regioning bounded by START and END." t) (autoload 'lbdb-maybe-region "lbdb" "If region is active search for content of region otherwise prompt." t) lbdb-0.38ubuntu1/install-sh0000775000000000000000000001272006611134637012600 0ustar #!/bin/sh # # install - install a program, script, or datafile # This comes from X11R5 (mit/util/scripts/install.sh). # # Copyright 1991 by the Massachusetts Institute of Technology # # Permission to use, copy, modify, distribute, and sell this software and its # documentation for any purpose is hereby granted without fee, provided that # the above copyright notice appear in all copies and that both that # copyright notice and this permission notice appear in supporting # documentation, and that the name of M.I.T. not be used in advertising or # publicity pertaining to distribution of the software without specific, # written prior permission. M.I.T. makes no representations about the # suitability of this software for any purpose. It is provided "as is" # without express or implied warranty. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. It can only install one file at a time, a restriction # shared with many OS's install programs. # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" # put in absolute paths if you don't have them in your path; or use env. vars. mvprog="${MVPROG-mv}" cpprog="${CPPROG-cp}" chmodprog="${CHMODPROG-chmod}" chownprog="${CHOWNPROG-chown}" chgrpprog="${CHGRPPROG-chgrp}" stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" mkdirprog="${MKDIRPROG-mkdir}" transformbasename="" transform_arg="" instcmd="$mvprog" chmodcmd="$chmodprog 0755" chowncmd="" chgrpcmd="" stripcmd="" rmcmd="$rmprog -f" mvcmd="$mvprog" src="" dst="" dir_arg="" while [ x"$1" != x ]; do case $1 in -c) instcmd="$cpprog" shift continue;; -d) dir_arg=true shift continue;; -m) chmodcmd="$chmodprog $2" shift shift continue;; -o) chowncmd="$chownprog $2" shift shift continue;; -g) chgrpcmd="$chgrpprog $2" shift shift continue;; -s) stripcmd="$stripprog" shift continue;; -t=*) transformarg=`echo $1 | sed 's/-t=//'` shift continue;; -b=*) transformbasename=`echo $1 | sed 's/-b=//'` shift continue;; *) if [ x"$src" = x ] then src=$1 else # this colon is to work around a 386BSD /bin/sh bug : dst=$1 fi shift continue;; esac done if [ x"$src" = x ] then echo "install: no input file specified" exit 1 else true fi if [ x"$dir_arg" != x ]; then dst=$src src="" if [ -d $dst ]; then instcmd=: else instcmd=mkdir fi else # Waiting for this to be detected by the "$instcmd $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if [ -f $src -o -d $src ] then true else echo "install: $src does not exist" exit 1 fi if [ x"$dst" = x ] then echo "install: no destination specified" exit 1 else true fi # If destination is a directory, append the input filename; if your system # does not like double slashes in filenames, you may need to add some logic if [ -d $dst ] then dst="$dst"/`basename $src` else true fi fi ## this sed command emulates the dirname command dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` # Make sure that the destination directory exists. # this part is taken from Noah Friedman's mkinstalldirs script # Skip lots of stat calls in the usual case. if [ ! -d "$dstdir" ]; then defaultIFS=' ' IFS="${IFS-${defaultIFS}}" oIFS="${IFS}" # Some sh's can't handle IFS=/ for some reason. IFS='%' set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` IFS="${oIFS}" pathcomp='' while [ $# -ne 0 ] ; do pathcomp="${pathcomp}${1}" shift if [ ! -d "${pathcomp}" ] ; then $mkdirprog "${pathcomp}" else true fi pathcomp="${pathcomp}/" done fi if [ x"$dir_arg" != x ] then $doit $instcmd $dst && if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi else # If we're going to rename the final executable, determine the name now. if [ x"$transformarg" = x ] then dstfile=`basename $dst` else dstfile=`basename $dst $transformbasename | sed $transformarg`$transformbasename fi # don't allow the sed command to completely eliminate the filename if [ x"$dstfile" = x ] then dstfile=`basename $dst` else true fi # Make a temp file name in the proper directory. dsttmp=$dstdir/#inst.$$# # Move or copy the file name to the temp name $doit $instcmd $src $dsttmp && trap "rm -f ${dsttmp}" 0 && # and set any options; do chmod last to preserve setuid bits # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $instcmd $src $dsttmp" command. if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && # Now rename the file to the real destination. $doit $rmcmd -f $dstdir/$dstfile && $doit $mvcmd $dsttmp $dstdir/$dstfile fi && exit 0 lbdb-0.38ubuntu1/m_fido.sh.in0000664000000000000000000000200311214161326012751 0ustar #! @SH@ # # -*-sh-*- # # $Id: m_fido.sh.in,v 1.8 2009-06-11 10:56:22 roland Exp $ # # Copyright (C) 1998-2005 Roland Rosenfeld # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software Foundation, # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,, USA. # m_fido_db=$HOME/.lbdb/nodelist m_fido_query() { test -f $m_fido_db || return grep -ia "$@." $m_fido_db || : } lbdb-0.38ubuntu1/TODO0000664000000000000000000000256310330776724011272 0ustar $Id: TODO,v 1.21 2005-10-29 22:55:16 roland Exp $ - Add new modules: - Add m_pgp6 for PGP 6.5.1. - lbdb_dotlock: Have a deep look into the locking mechanism. Over NFS dotlocking may not be enough, it should be combined with fcntl() (this should be possible to disable via configure option). This means that we may no longer use mutt_dotlock but always use a private lbdb_dotlock. - fetchaddr: Find out why fetchaddr sometimes runs forever on Solaris 2.6. - Add man page for configuration file lbdbrc(5) or something like this. - Think about a debug/log mechanism for lbdbq and the modules, so an error in a module doesn't imply lbdbq to fail but all other modules work as usual and the error messages (and debug informations) are written to the logfile (maybe ~/.lbdb/debug). - lbdb-fetchaddr/m_inmail: Make the database file configurable. This can be realized in lbdb-fetchaddr via a new option, while m_inmail needs a new lbdbrc-variable for this. - replace m_passwd and m_yppasswd by m_getent, if getent(1) is supported by all UNIXes. Otherwise we need some autoconf magic to do the right thing... - Optimize munge/munge-keeporder to work case-insensitive (at least on the domain part of the addresses). - Add UTF-8 support. Roland Rosenfeld $Id: TODO,v 1.21 2005-10-29 22:55:16 roland Exp $ Local variables: mode: text End: lbdb-0.38ubuntu1/m_pine.sh.in0000664000000000000000000001012410330705652012772 0ustar #! @SH@ # # -*-sh-*- # # Copyright (C) 2000 Gabor Fleischer # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software Foundation, # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,, USA. # # $Id: m_pine.sh.in,v 1.10 2005-10-29 14:48:10 roland Exp $ # m_pine for lbdb v0.9 by Gabor Fleischer # # Two variabled can be set in lbdbrc: PINERC, PINE_ADDRESSBOOKS # Here comes the explanation what are they for: # 1. First I look for $PINERC. If not set, then I use my defaults: # PINERC="/etc/pine.conf /etc/pine.conf.fixed .pinerc" # If you don't want me to look in the default PINERCs, then set PINERC=no # 2. I make a list of all the addressbooks in the PINERCs. # 3. Then the $PINE_ADDRESSBOOKS are added to this list. # 4. And if this list is still empty then add the default addressbooks: # PINE_ADDRESSBOOKS="/etc/addressbook .addressbook" # 5. Make the query in the listed addressbooks # # Changelog: # 0.9: Convert Quoted-Printable in the real names into plain 8bit. # 0.8: When the 'real name' is missing, put " " there, so mutt works fine. # 0.7: Fixed bugs: # * Search was case sensitive. Now it's insensitive. # * Lines with missing fields (i.e."nickaddr") were broken. # * Default didn't work if address-books in pinercs were "". # 0.6: The .addressbook format's multi-line addresses are supported. # 0.5: Initial release. # AWK=@AWK@ prefix=@prefix@ exec_prefix=@exec_prefix@ qpto8bit=@libdir@/qpto8bit m_pine_query() { addressbooks= if [ x$PINERC != xno ] ; then for pinerc in ${PINERC:-/etc/pine.conf /etc/pine.conf.fixed .pinerc} do if [ $pinerc = ${pinerc#/} ] ; then pinerc=$HOME/$pinerc fi if [ -f $pinerc ] ; then addressbook=`\ $AWK 'BEGIN {SPACE="";} \ /^(global-)?address-book[ ]*=/ { \ sub("^(global-)?address-book[ ]*=",""); \ while (/[ ]*[^ ]+[ ]+([^ , ]+)[ ]*,/) { \ sub("[ ]*[^ ]+[ ]+",""); \ sub("[ , ].*",""); \ printf("%s%s",SPACE,$0); \ SPACE=" "; \ getline; \ } \ sub("[ ]*[^ ]+[ ]+",""); \ sub("[ ].*",""); \ printf("%s%s",SPACE,$0); \ SPACE=" "; \ }' < $pinerc` fi addressbooks="${addressbook# } ${addressbooks# }" done fi addressbooks="${PINE_ADDRESSBOOKS} ${addressbooks# }" addressbooks=${addressbooks# } for file in ${addressbooks:=/etc/addressbook .addressbook} ; do if [ $file = ${file#/} ] ; then file=$HOME/$file fi if [ -f $file ] then cat $file | $qpto8bit | $AWK -v find="$@" '\ function out() { \ if (match(tolower(line),low_find)) { #order: nick full addr fcc comm \ R[1] = "^[^ ]*"; \ R[2] = "^[^ ]* [^ ]*"; \ R[3] = "^[^ ]* [^ ]* \\(?[^ ]*\\)?"; \ R[4] = "^[^ ]* [^ ]* [^ ]* [^ ]*"; \ R[5] = "^[^ ]* [^ ]* [^ ]* [^ ]* [^ ]*"; \ beg = 1; \ for (i=1;i<=5;i++) { \ match(line,R[i]); \ A[i] = substr(line,beg,RLENGTH-beg+1); \ beg = RLENGTH+2; \ } \ if (A[2] == "") {A[2] = " "} \ if (match(A[3],/\(.*\)/)) {A[3] = substr(A[3],2,length(A[3])-2)} \ if (A[5] != "") {A[5] = " [" A[5] "]"} \ printf "%s %s %s%s (pine)\n",A[3],A[2],A[1],A[5]; \ } \ } \ BEGIN { \ FS=" "; \ low_find = tolower(find); \ getline; \ while (/^#DELETED/) {getline} ; \ line = $0 \ } \ $0 !~ /^#DELETED/ { \ if (/^ /) { \ gsub(" ",""); \ line = line $0; \ } else { \ out(); \ line = $0; \ } \ } \ END { \ out() \ }' fi done } lbdb-0.38ubuntu1/m_bbdb.sh.in0000664000000000000000000000366511214161326012740 0ustar #! @SH@ # # -*-sh-mode-*- # # Copyright (c) 2001 Utz-Uwe Haus 2001 # Copyright (c) 2003 Aaron Kaplan # Copyright (c) 2005 Roland Rosenfeld # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software Foundation, # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,, USA. # # $Id: m_bbdb.sh.in,v 1.9 2009-06-11 10:56:22 roland Exp $ prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ m_bbdb_query() { if [ -f ${LBDB_BBDB_SCRIPT:=$libdir/lbdb_bbdb_query.el} ] then form="(progn (require (quote lbdb-bbdb-query) \"$LBDB_BBDB_SCRIPT\") (lbdb-bbdb-query \"$@\"))" if [ -z "$GNUCLIENT" ] then if type gnuclient >/dev/null 2>&1; then GNUCLIENT=gnuclient fi fi if [ "$GNUCLIENT" = "no" ]; then GNUCLIENT= fi success=0 if [ -n "$GNUCLIENT" ] ; then if $GNUCLIENT -batch -eval "$form" 2> /dev/null; then success=1 fi fi if [ $success = 0 ]; then if [ -z "$EMACS" ] then if type emacs >/dev/null 2>&1; then EMACS=emacs elif type xemacs >/dev/null 2>&1; then EMACS=xemacs fi fi if [ -n "$EMACS" ] ; then $EMACS -nw --no-site-file --no-init-file -batch \ --eval "$form" 2>/dev/null fi fi fi | grep -va '^$' || : } lbdb-0.38ubuntu1/m_gnomecard.sh.in0000664000000000000000000000360211214161326013775 0ustar #! @SH@ # # -*-sh-*- # # m_gnomecard - GnomeCard Address book module for lbdb # Copyright (C) 2000 Rick Frankel # 2000-2005 Roland Rosenfeld # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software Foundation, # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,, USA. # # $Id: m_gnomecard.sh.in,v 1.9 2009-06-11 10:56:22 roland Exp $ # prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ AWK=@AWK@ rcfile=$HOME/.gnome/GnomeCard m_gnomecard_query () { if [ -z "$GNOMECARD_FILES" ] then if [ -r "$rcfile" ] then GNOMECARD_FILES=`\ $AWK 'BEGIN {FS="="; infile=0} \ /^\[.*\]/ {infile=0} \ /^\[file\]/ {infile=1} \ infile && /^open=/ {print $2}' \ < $rcfile` fi if [ -z "$GNOMECARD_FILES" ] then GNOMECARD_FILES="$HOME/.gnome/GnomeCard.gcrd" fi fi for file in $GNOMECARD_FILES do if [ $file = ${file#/} ] then file=$HOME/$file fi if [ -f $file ] then $AWK 'BEGIN {FS=":"; RS="\r\n"; name=""} \ /^END:VCARD/ {name=""} \ /^FN[:;]/ {name=$2} \ name!="" && /^EMAIL;/ {email=$2; \ type=substr($1,7); \ printf ("%s\t%s\tGC:%s\n", \ email, name, type) }' \ < $file | grep -ia "$@" || : fi done } lbdb-0.38ubuntu1/NEWS0000664000000000000000000000007007241216376011267 0ustar You find a detailed log of changes in debian/changelog. lbdb-0.38ubuntu1/mkinstalldirs0000775000000000000000000000133506611134637013402 0ustar #! /bin/sh # mkinstalldirs --- make directory hierarchy # Author: Noah Friedman # Created: 1993-05-16 # Public domain # $Id: mkinstalldirs,v 1.1.1.1 1998-10-14 14:47:59 roland Exp $ errstatus=0 for file do set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` shift pathcomp= for d do pathcomp="$pathcomp$d" case "$pathcomp" in -* ) pathcomp=./$pathcomp ;; esac if test ! -d "$pathcomp"; then echo "mkdir $pathcomp" 1>&2 mkdir "$pathcomp" || lasterr=$? if test ! -d "$pathcomp"; then errstatus=$lasterr fi fi pathcomp="$pathcomp/" done done exit $errstatus # mkinstalldirs ends here lbdb-0.38ubuntu1/tac.awk.in0000664000000000000000000000203010330705653012440 0ustar #! @AWK@ -f # # -*-awk-*- # # Copyright (C) 2000-2005 Roland Rosenfeld # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software Foundation, # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,, USA. # # $Id: tac.awk.in,v 1.3 2005-10-29 14:48:11 roland Exp $ # # Output file in reverse order BEGIN { i = 0; } { line[i++] = $0; } END { for (i-- ; i>=0; i--) { print line[i]; } } lbdb-0.38ubuntu1/lbdb_lib.sh.in0000664000000000000000000000401510467564201013262 0ustar #! @SH@ # # -*-sh-mode-*- # # Copyright (C) 1998 Thomas Roessler # Copyright (C) 1999-2006 Roland Rosenfeld # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software Foundation, # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,, USA. # # $Id: lbdb_lib.sh.in,v 1.7 2006-08-13 08:53:21 roland Exp $ # # library routines # lbdb_hn_sendmail() { sendmail_cf="NONE" for p in /etc /etc/mail /etc/sendmail ; do if test -r $p/sendmail.cf ; then sendmail_cf=$p/sendmail.cf break; fi done if test "x$sendmail_cf" != "xNONE" ; then hn="`sed -n -e 's/^DM\(.*\)$/\1/p' $sendmail_cf`" if test "x$hn" = x ; then hn="`sed -n -e 's/^Dj\(.*\)$/\1/p' $sendmail_cf`" fi fi if test "x$hn" = x ; then echo "NONE" else echo "$hn" fi } lbdb_hostname() { if test "x$MAIL_DOMAIN_NAME" != "x" ; then hn=$MAIL_DOMAIN_NAME elif test -f /etc/mailname; then hn=`cat /etc/mailname` else hn="" if test -r /etc/resolv.conf ; then hn="`sed -n -e 's/^[ ]*domain[ ]\{1,\}\([^ ]*\)/\1/p' /etc/resolv.conf`" if test "x$hn" = "x" ; then hn="`sed -n -e 's/^[ ]*search[ ]\{1,\}\([^ ]*\)/\1/p' /etc/resolv.conf`" fi fi if test "x$hn" = "x" ; then hn=`lbdb_hn_sendmail` if test "x$hn" = "xNONE" ; then for i in /etc/HOSTNAME /etc/hostname ; do if test -f $i ; then hn="`cat $i`" break; fi done fi fi fi echo "$hn" } lbdb-0.38ubuntu1/munge-keeporder.awk.in0000664000000000000000000000223510330705653014771 0ustar #! @AWK@ -f # # -*-awk-*- # # Copyright (C) 1998-2000 Thomas Roessler # 2000 Roland Rosenfeld # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software Foundation, # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,, USA. # # $Id: munge-keeporder.awk.in,v 1.3 2005-10-29 14:48:11 roland Exp $ BEGIN { FS = "\t"; i = 0; } { line[$1] = $0; pos[$1] = i; idx[i++] = $1; } END { for (j = 0; j < i; j++) { if (pos[idx[j]] == j) { print line[idx[j]]; } } } lbdb-0.38ubuntu1/lbdbq.man.in0000664000000000000000000002502011374551606012760 0ustar .\" -*- nroff -*- .\" Copyright (c) 1998-2007 Roland Rosenfeld .\" .\" This program is free software; you can redistribute it and/or modify .\" it under the terms of the GNU General Public License as published by .\" the Free Software Foundation; either version 2 of the License, or .\" (at your option) any later version. .\" .\" This program is distributed in the hope that it will be useful, .\" but WITHOUT ANY WARRANTY; without even the implied warranty of .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the .\" GNU General Public License for more details. .\" .\" You should have received a copy of the GNU General Public License .\" along with this program; if not, write to the Free Software Foundation, .\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,, USA. .\" .\" $Id: lbdbq.man.in,v 1.49 2010-05-18 17:51:02 roland Exp $ .\" .TH LBDBQ 1 "September 2007" "Unix" "User Manuals" .SH NAME lbdbq \- query program for the little brother's database .SH SYNOPSIS .B lbdbq .I something .br .B lbdbq .RB [ -v | --version | -h | --help ] .SH DESCRIPTION .B lbdbq is the client program for the little brother's database. It will attempt to invoke various modules to gather information about persons matching .IR something . E.g., it may look at a list of addresses from which you have received mail, it may look at YP maps, or it may try to finger .IR something @ "" . .PP The behavior is configurable: Upon startup, .B lbdbq will source the shell scripts: .RS .I @sysconfdir@/lbdb.rc .br .I $HOME/.lbdbrc .br .I $HOME/.lbdb/lbdbrc .br .I $HOME/.lbdb/rc .RE if they exist. .PP They can be used to set the following global variables: .TP .B MODULES_PATH a space separated list of directories, where .B lbdbq should look for modules. .TP .B METHODS a space separated list of the modules to use. .TP .B SORT_OUTPUT If you set this to .I false or .IR no , lbdbq won't sort the addresses but returns them in reverse order (which means that the most recent address in m_inmail database is first). If you set this to .IR name , lbdbq sorts the output by real name. If you set this to .IR comment , it sort the output by the comment (for example the date in .BR m_inmail ). .I reverse_comment realizes the same as .IR comment , but in reverse order, so the most recent timestamp of m_inmail may be on top. If you set SORT_OUTPUT to .IR address , lbdbq sorts the output by addresses (that's the default). .TP .B KEEP_DUPES If you set this to .I true or .IR yes , lbdbq won't remove duplicate addresses with different real name comment fields. .PP Note that there .I are defaults, so you should most probably modify these variables using constructs like this: .nf MODULES_PATH="$MODULES_PATH $HOME/lbdb_modules" .fi .PP Additionally, modules may have configuration variables of their own. .SH MODULES Currently, the following modules are supplied with lbdb: .TP .B m_finger This module will use finger to find out something more about a person. The list of hosts do be asked is configurable; use the .B M_FINGER_HOSTS variable. Note that "localhost" will mean an invocation of your local .BR finger (1) binary, and should thus work even if you don't provide the finger service to the network. .B m_finger tries to find out the machines mail domain name in .IR /etc/mailname , by parsing a .I sendmail.cf file (if it finds one) and by reading .I /etc/hostname and .IR /etc/HOSTNAME . If you know that this fails on your machine, or you want to force lbdbq to consider some other name to be the local mail domain name (misconfigured SUNs come to mind here), you can specify a name using the .B MAIL_DOMAIN_NAME variable. If this variable is set by you, no probing will be done by .BR lbdbq . .TP .B m_inmail This module will look up user name fragments in a list of mail addresses created by .BR lbdb-fetchaddr (1). .TP .B m_passwd This module searches for matching entries in your local /etc/passwd file. It evaluates the local machine mail domain in the same way .B m_finger does. If you set .BR PASSWD_IGNORESYS=true , this module ignores all system accounts and only finds UIDs between 1000 and 29999 (all other UIDs are reserved on a Debian system). .TP .B m_yppasswd This module searches for matching entries in the NIS password database using the command ``ypcat passwd''. .TP .B m_nispasswd This module searches for matching entries in the NIS+ password database using the command ``niscat passwd.org_dir''. .TP .B m_getent This module searches for matching entries in whatever password database is configured using the command ``getent passwd''. .TP .BR m_pgp2 ", " m_pgp5 ", " m_gpg These modules scan your PGP 2.*, PGP 5.* or GnuPG public key ring for data. They use the programs .BR pgp (1), .BR pgpk (1), or .BR gpg (1) to get the data. .TP .BR m_fido This module searches your Fido nodelist, stored in .I $HOME/.lbdb/nodelist created by .BR nodelist2lbdb (1). .TP .BR m_abook This module uses the program .BR abook (1), a text based address book application to search for addresses. You can define multiple abook address books by setting the variable .B ABOOK_FILES to a space separated list. .TP .BR m_addr_email This module uses the program .BR addr-email (1), a text based frontend to the Tk .BR addressbook (1) application. .TP .BR m_muttalias This module searches the variable .B MUTTALIAS_FILES (a space separated list) of files in .B MUTT_DIRECTORY that contain mutt aliases. File names without leading slash will have .B MUTT_DIRECTORY (defaults to .BI $HOME /.mutt or .BR $HOME , if .BI $HOME /.mutt does not exist) prepended before the file name. Absolute file names (beginning with .IR / ) will be taken direct. .TP .BR m_pine This module searches .BR pine (1) addressbook files for aliases. To realize this it first inspects the variable .BR PINERC . If it isn't set, the default .RI ` "/etc/pine.conf /etc/pine.conf.fixed .pinerc" ' is used. To suppress inspecting the .B PINERC variable, set it to .IR no . It than takes all .B address-book and .B global-address-book entries from these pinerc files and adds the contents of the variable .B PINE_ADDRESSBOOKS to the list, which defaults to .RI ` "/etc/addressbook .addressbook" '. Then these addressbooks are searched for aliases. All filenames without leading slash are searched in .BR $HOME . .TP .BR m_palm This module searches the Palm address database using the .BR Palm::PDB (3pm) and .BR Palm::Address (3pm) Perl modules from CPAN. It searches in the variable .B PALM_ADDRESS_DATABASE or if this isn't set in .IR $HOME/.jpilot/AddressDB.pdb . .TP .BR m_gnomecard This module searches for addresses in your GnomeCard database files. The variable .B GNOMECARD_FILES is a whitespace separated list of GnomeCard data files. If this variable isn't defined, the module searches in .BI $HOME /.gnome/GnomeCard for the GnomeCard database or at least falls back to .BI $HOME /.gnome/GnomeCard.gcrd\fR. If a filename does not start with a slash, it is prefixed with .BR $HOME/ . .TP .BR m_bbdb This module searches for addresses in your (X)Emacs BBDB (big brother database). It doesn't access ~/.bbdb directly (yet) but calls .BR emacs (1) or .BR xemacs (1) with a special mode to get the information (so don't expect too much performance in this module). You can configure the .B EMACS variable to tell this module which emacsen to use. Otherwise it will fall back to .B emacs or .BR xemacs. .TP .BR m_ldap This module queries an LDAP server using the .BR Net::LDAP (3pm) Perl modules from CPAN. It can be configured using an external resource file .I @sysconfdir@/lbdb_ldap.rc You can explicity define a LDAP query in this file or you can use one or more of the predefined queries from the .B %ldap_server_db in this file. For this you have to define a space separated list of nicknames from entries in the variable .BR LDAP_NICKS . .TP .BR m_wanderlust This module searches for addresses stored in your .I $WANDERLUST_ADDRESSES (or by default in .IR $HOME/.addresses ) file, an addressbook of .BR WanderLust . .TP .BR m_osx_addressbook This module queries the OS X AddressBook. It is only available on OS X systems. .TP .BR m_evolution This module queries the Ximian Evolution address book. It depends on the program .BR evolution-addressbook-export , which is shipped with evolution. .TP .BR m_vcf This module uses libvformat to search for addresses from the space\-separated set of vCard files defined in .IR $VCF_FILES . .PP Feel free to create your own modules to query other database resources, YP maps, and the like. .B m_finger should be a good example of how to do it. .PP If you create your own modules or have other changes and feel that they could be helpful for others, don't hesitate to submit them to the author for inclusion in later releases. .PP Finally, to use .B lbdbq from mutt, add the following line to your .I $HOME/.muttrc: .nf set query_command="lbdbq %s" .fi .SH OPTIONS .IP "-v | --version" Print version number of lbdbq. .IP "-h | --help" Print short help of lbdbq. .SH FILES .I @sysconfdir@/lbdb.rc .br .I $HOME/.lbdbrc .br .I $HOME/.lbdb/lbdbrc .br .I $HOME/.lbdb/rc .br .I @libdir@/* .br .I $HOME/.lbdb/m_inmail.list .br .I $HOME/.lbdb/nodelist .SH "SEE ALSO" .BR finger (1), .BR ypcat (1), .BR niscat (1), .BR getent (1), .BR pgp (1), .BR pgpk (1), .BR gpg (1), .BR lbdb-fetchaddr (1), .BR nodelist2lbdb (1), .BR mutt_ldap_query (1), .BR abook (1), .BR addr-email (1), .BR addressbook (1), .BR mutt (1), .BR pine (1), .BR emacs (1), .BR xemacs (1), .BR Palm::PDB (3pm), .BR Palm::Address (3pm), .BR Net::LDAP (3pm). .SH CREDITS Most of the really interesting code of this program (namely, the RFC 822 address parser used by lbdb-fetchaddr) was stolen from Michael Elkins' mutt mail user agent. Additional credits go to Brandon Long for putting the query functionality into mutt. .PP Many thanks to the authors of the several modules and extensions: Ross Campbell (m_abook, m_yppasswd), Marc de Courville (m_ldap, mutt_ldap_query), Brendan Cully (m_osx_addressbook, m_vcf), Gabor Fleischer (m_pine), Rick Frankel (m_gnomecard), Utz-Uwe Haus (m_bbdb, m_nispasswd), Torsten Jerzembeck (m_addr_email), Adrian Likins (m_getent), Gergely Nagy (m_wanderlust), Dave Pearson (m_palm, lbdb.el), and Brian Salter-Duke (m_muttalias). .SH AUTHOR The lbdb package was initially written by Thomas Roessler and is now maintained and heavily extended by Roland Rosenfeld . lbdb-0.38ubuntu1/m_passwd.sh.in0000775000000000000000000000234211214161326013342 0ustar #! @SH@ # # -*-sh-*- # # Copyright (C) 1999-2005 Roland Rosenfeld # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software Foundation, # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,, USA. # # $Id: m_passwd.sh.in,v 1.13 2009-06-11 10:56:22 roland Exp $ # m_passwd_query() { HOST="`lbdb_hostname`" case "$PASSWD_IGNORESYS" in true|yes|1) IGNORESYS='UID \([12]....\|....\)$' ;; *) IGNORESYS='.' ;; esac sed -e "s/^\([^:]*\):[^:]*:\([^:]*\):[^:]*:\([^:,]*\)[,:].*\$/\1@$HOST \3 UID \2/" /etc/passwd \ | grep -ia "$@" | grep -a "$IGNORESYS" || : } lbdb-0.38ubuntu1/lbdb-munge.sh.in0000664000000000000000000000307710330705651013547 0ustar #! @SH@ # # -*-sh-*- # # Copyright (C) 1999-2005 Roland Rosenfeld # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software Foundation, # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,, USA. # # $Id: lbdb-munge.sh.in,v 1.8 2005-10-29 14:48:09 roland Exp $ LBDB_VERSION=@LBDB_VERSION@ umask 077 prefix=@prefix@ exec_prefix=@exec_prefix@ dotlock=@DOTLOCK@ fetchaddr=@libdir@/fetchaddr db=$HOME/.lbdb/m_inmail.list if [ "$SORT_OUTPUT" = "false" -o "$SORT_OUTPUT" = "no" ] then munge=@libdir@/munge-keeporder else munge=@libdir@/munge fi if [ ! -f $db.dirty ]; then # Nothing to do exit 0 fi if $dotlock -r 10 -f $db then : # okay, do nothing else echo "Can't lock $db [dotlock returned $rv]." >&2 exit 1 fi if $munge < $db > $db.$$.tmp 2>/dev/null then # only move, if munge successful: mv -f $db.$$.tmp $db rm -f $db.dirty else rm -f $db.$$.tmp # maybe write a debug log here... fi $dotlock -u $db lbdb-0.38ubuntu1/lbdb-fetchaddr.man.in0000664000000000000000000000701610711134740014514 0ustar .\" -*- nroff -*- .\" Copyright (c) 1998-2005 Roland Rosenfeld .\" .\" This program is free software; you can redistribute it and/or modify .\" it under the terms of the GNU General Public License as published by .\" the Free Software Foundation; either version 2 of the License, or .\" (at your option) any later version. .\" .\" This program is distributed in the hope that it will be useful, .\" but WITHOUT ANY WARRANTY; without even the implied warranty of .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the .\" GNU General Public License for more details. .\" .\" You should have received a copy of the GNU General Public License .\" along with this program; if not, write to the Free Software Foundation, .\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,, USA. .\" .TH LBDB-FETCHADDR 1 "October 2005" "Unix" "User Manuals" .SH NAME lbdb-fetchaddr \- grab addresses from mails add append them to lbdb database .SH SYNOPSIS .B lbdb-fetchaddr .RB [ -d .IR dateformat ] .RB [ -x .IR headerfieldlist ] .RB [ -c .IR charset ] .RB [ -a ] .br .B lbdb-fetchaddr .RB [ -v | -h ] .SH DESCRIPTION .B lbdb-fetchaddr is a shell script which reads a mail on stdin. It extracts the contents of some header fields (default: .RB ` From: ', .RB ` To: ', .RB ` Cc: ', .RB ` Resent-From: ', and .RB ` Resent-To: ') from the mail header (only addresses with a real name) and appends them to .IR $HOME/.lbdb/m_inmail.list . For performance issues .B lbdb-fetchaddr appends new addresses to this file without removing duplicates. To get rid of duplicates, the program .B lbdb-munge exists, which is run by .B m_inmail if needed and removes duplicates. .PP To use this program, put the following lines into your .I $HOME/.procmailrc: .nf :0hc | lbdb-fetchaddr .fi .PP .B lbdb-fetchaddr writes the actual date to the third column of the database by using .BR strftime (3). It uses "%Y-%m-%d %H:%M" as the default date format (e.g. "1999-04-29 14:33"). You can change this by using the .B -d option to select a different date format string as parameter of lbdb-fetchaddr command like .nf :0hc | lbdb-fetchaddr \-d "%y-%m-%d" .fi which results in e.g. "99-04-29". .SH OPTIONS .TP .B -v Print version number of lbdb-fetchaddr. .TP .B -h Print short help of lbdb-fetchaddr. .TP .BI -d " dateformat" Use the given date format using .BR strftime (3) syntax. .TP .BI -x " headerfields" A colon separated list of header fields, which should be searched for mail addresses. If this option isn't given, we fall back to .RB ` from:to:cc:resent-from:resent-to '. .TP .BI -c " charset" The charset which will be used to write the database. This should be the charset which the application expects (normally the one from your current locale). If this option isn't given, we fall back to .RB ` iso-8859-15 '. .TP .B -a Also grab addresses without a real name. Use the local part of the mail address as real name. .SH FILES .I $HOME/.lbdb/m_inmail.list .br .I @libdir@/fetchaddr .br .I @libdir@/m_inmail .SH "SEE ALSO" .BR lbdbq (1), .BR @dotlock@ (1), .BR procmail (1), .BR procmailrc (5), .BR strftime (3). .SH CREDITS Most of the really interesting code of this program (namely, the RFC 822 address parser used by lbdb-fetchaddr) was stolen from Michael Elkins' mutt mail user agent. Additional credits go to Brandon Long for putting the query functionality into mutt. .SH AUTHOR The lbdb package was written by Thomas Roessler and is now maintained and extended by Roland Rosenfeld . lbdb-0.38ubuntu1/configure0000775000000000000000000063663010711134737012514 0ustar #! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.61. # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # PATH needs CR # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) as_nl=' ' IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # CDPATH. $as_unset CDPATH if test "x$CONFIG_SHELL" = x; then if (eval ":") 2>/dev/null; then as_have_required=yes else as_have_required=no fi if test $as_have_required = yes && (eval ": (as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=\$LINENO as_lineno_2=\$LINENO test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } ") 2> /dev/null; then : else as_candidate_shells= as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. case $as_dir in /*) for as_base in sh bash ksh sh5; do as_candidate_shells="$as_candidate_shells $as_dir/$as_base" done;; esac done IFS=$as_save_IFS for as_shell in $as_candidate_shells $SHELL; do # Try only shells that exist, to save several forks. if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { ("$as_shell") 2> /dev/null <<\_ASEOF if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi : _ASEOF }; then CONFIG_SHELL=$as_shell as_have_required=yes if { "$as_shell" 2> /dev/null <<\_ASEOF if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi : (as_func_return () { (exit $1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = "$1" ); then : else exitcode=1 echo positional parameters were not saved. fi test $exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } _ASEOF }; then break fi fi done if test "x$CONFIG_SHELL" != x; then for as_var in BASH_ENV ENV do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done export CONFIG_SHELL exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} fi if test $as_have_required = no; then echo This script requires a shell more modern than all the echo shells that I found on your system. Please install a echo modern shell, or manually run the script under such a echo shell if you do have one. { (exit 1); exit 1; } fi fi fi (eval "as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0") || { echo No shell found that supports shell functions. echo Please tell autoconf@gnu.org about your system, echo including any error possibly output before this echo message } as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, and appends # trailing '-' during substitution so that $LINENO is not a special # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # scripts with optimization help from Paolo Bonzini. Blame Lee # E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME= PACKAGE_TARNAME= PACKAGE_VERSION= PACKAGE_STRING= PACKAGE_BUGREPORT= ac_unique_file="fetchaddr.c" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir localstatedir includedir oldincludedir docdir infodir htmldir dvidir pdfdir psdir libdir localedir mandir DEFS ECHO_C ECHO_N ECHO_T LIBS build_alias host_alias target_alias CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CPP GREP EGREP build build_cpu build_vendor build_os host host_cpu host_vendor host_os LIBICONV LTLIBICONV BASH KSH BINSH SH AWK MAWK GAWK NAWK TAC TACTARGET DOTLOCK_OLD DOTLOCK DOTLOCK_TARGET DOTLOCKBASE path_fetchaddr FINGER ABOOK ADDR_EMAIL YPCAT NISCAT GETENT GPG PGPK PGP EVOLUTION_ADDRESSBOOK_EXPORT PERL XCODEBUILD PBXBUILD VFORMAT LBDB_VERSION MODULES LIBOBJS LTLIBOBJS' ac_subst_files='' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP' # Initialize some variables set by options. ac_init_help= ac_init_version=false # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` eval enable_$ac_feature=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` eval enable_$ac_feature=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/[-.]/_/g'` eval with_$ac_package=\$ac_optarg ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/[-.]/_/g'` eval with_$ac_package=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) { echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` { echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi # Be sure to have absolute directory names. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; } done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || { echo "$as_me: error: Working directory cannot be determined" >&2 { (exit 1); exit 1; }; } test "X$ac_ls_di" = "X$ac_pwd_ls_di" || { echo "$as_me: error: pwd does not report name of working directory" >&2 { (exit 1); exit 1; }; } # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$0" || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X"$0" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 { (exit 1); exit 1; }; } pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures this package to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then cat <<\_ACEOF Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --disable-rpath do not hardcode runtime library paths (--enable-lbdb-dotlock, Force use of lbdb_dotlock program) Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-gnu-ld assume the C compiler uses GNU ld default=no --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib --without-libiconv-prefix don't search for libiconv in includedir and libdir --with-finger with finger support --with-abook with abook support --with-addr-email with addressbook support --with-ypcat with ypcat passwd support --with-niscat with niscat passwd support --with-getent with getent passwd support --with-gpg with GnuPG support --with-pgpk with PGP 5.* support --with-pgp with PGP 2.* support --with-evolution-addressbook-export with Ximan Evolution support Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF configure generated by GNU Autoconf 2.61 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was generated by GNU Autoconf 2.61. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; 2) ac_configure_args1="$ac_configure_args1 '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac done done $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _ASBOX echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( *) $as_unset $ac_var ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX ## ------------------- ## ## File substitutions. ## ## ------------------- ## _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo cat confdefs.h echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. if test -n "$CONFIG_SITE"; then set x "$CONFIG_SITE" elif test "x$prefix" != xNONE; then set x "$prefix/share/config.site" "$prefix/etc/config.site" else set x "$ac_default_prefix/share/config.site" \ "$ac_default_prefix/etc/config.site" fi shift for ac_site_file do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { echo "$as_me:$LINENO: creating cache $cache_file" >&5 echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 echo "$as_me: former value: $ac_old_val" >&2;} { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 echo "$as_me: current value: $ac_new_val" >&2;} ac_cache_corrupted=: fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 echo "$as_me: error: changes in the environment can compromise the build" >&2;} { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { echo "$as_me:$LINENO: checking for prefix" >&5 echo $ECHO_N "checking for prefix... $ECHO_C" >&6; } if test x$prefix = xNONE; then lbdb_cv_prefix=$ac_default_prefix else lbdb_cv_prefix=$prefix fi { echo "$as_me:$LINENO: result: $lbdb_cv_prefix" >&5 echo "${ECHO_T}$lbdb_cv_prefix" >&6; } ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. echo "$as_me:$LINENO: checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # # List of possible output files, starting from the most likely. # The algorithm is not robust to junk in `.', hence go to wildcards (a.*) # only as a last resort. b.out is created by i960 compilers. ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' # # The IRIX 6 linker writes into existing files which may not be # executable, retaining their permissions. Remove them first so a # subsequent execution test works. ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { (ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link_default") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi { echo "$as_me:$LINENO: result: $ac_file" >&5 echo "${ECHO_T}$ac_file" >&6; } if test -z "$ac_file"; then echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: C compiler cannot create executables See \`config.log' for more details." >&5 echo "$as_me: error: C compiler cannot create executables See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } fi ac_exeext=$ac_cv_exeext # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { echo "$as_me:$LINENO: checking whether the C compiler works" >&5 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { echo "$as_me:$LINENO: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&5 echo "$as_me: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi fi fi { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } { echo "$as_me:$LINENO: result: $cross_compiling" >&5 echo "${ECHO_T}$cross_compiling" >&6; } { echo "$as_me:$LINENO: checking for suffix of executables" >&5 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest$ac_cv_exeext { echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 echo "${ECHO_T}$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT { echo "$as_me:$LINENO: checking for suffix of object files" >&5 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 echo "${ECHO_T}$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CFLAGS="" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_c89=$ac_arg else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { echo "$as_me:$LINENO: result: none needed" >&5 echo "${ECHO_T}none needed" >&6; } ;; xno) { echo "$as_me:$LINENO: result: unsupported" >&5 echo "${ECHO_T}unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; esac ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} { (exit 1); exit 1; }; } fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. { echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi done done ;; esac done IFS=$as_save_IFS fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { echo "$as_me:$LINENO: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { echo "$as_me:$LINENO: result: $CPP" >&5 echo "${ECHO_T}$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&5 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } if test "${ac_cv_path_GREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Extract the first word of "grep ggrep" to use in msg output if test -z "$GREP"; then set dummy grep ggrep; ac_prog_name=$2 if test "${ac_cv_path_GREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ac_count=`expr $ac_count + 1` if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS fi GREP="$ac_cv_path_GREP" if test -z "$GREP"; then { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_GREP=$GREP fi fi { echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 echo "${ECHO_T}$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { echo "$as_me:$LINENO: checking for egrep" >&5 echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } if test "${ac_cv_path_EGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else # Extract the first word of "egrep" to use in msg output if test -z "$EGREP"; then set dummy egrep; ac_prog_name=$2 if test "${ac_cv_path_EGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ac_count=`expr $ac_count + 1` if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS fi EGREP="$ac_cv_path_EGREP" if test -z "$EGREP"; then { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_EGREP=$EGREP fi fi fi { echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi { echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 echo "${ECHO_T}$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done if test "${ac_cv_header_getopt_h+set}" = set; then { echo "$as_me:$LINENO: checking for getopt.h" >&5 echo $ECHO_N "checking for getopt.h... $ECHO_C" >&6; } if test "${ac_cv_header_getopt_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi { echo "$as_me:$LINENO: result: $ac_cv_header_getopt_h" >&5 echo "${ECHO_T}$ac_cv_header_getopt_h" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking getopt.h usability" >&5 echo $ECHO_N "checking getopt.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking getopt.h presence" >&5 echo $ECHO_N "checking getopt.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: getopt.h: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: getopt.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: getopt.h: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: getopt.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: getopt.h: present but cannot be compiled" >&5 echo "$as_me: WARNING: getopt.h: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: getopt.h: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: getopt.h: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: getopt.h: see the Autoconf documentation" >&5 echo "$as_me: WARNING: getopt.h: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: getopt.h: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: getopt.h: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: getopt.h: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: getopt.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: getopt.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: getopt.h: in the future, the compiler will take precedence" >&2;} ;; esac { echo "$as_me:$LINENO: checking for getopt.h" >&5 echo $ECHO_N "checking for getopt.h... $ECHO_C" >&6; } if test "${ac_cv_header_getopt_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_getopt_h=$ac_header_preproc fi { echo "$as_me:$LINENO: result: $ac_cv_header_getopt_h" >&5 echo "${ECHO_T}$ac_cv_header_getopt_h" >&6; } fi if test $ac_cv_header_getopt_h = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_GETOPT_H 1 _ACEOF fi if test "X$prefix" = "XNONE"; then acl_final_prefix="$ac_default_prefix" else acl_final_prefix="$prefix" fi if test "X$exec_prefix" = "XNONE"; then acl_final_exec_prefix='${prefix}' else acl_final_exec_prefix="$exec_prefix" fi acl_save_prefix="$prefix" prefix="$acl_final_prefix" eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" prefix="$acl_save_prefix" # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} { (exit 1); exit 1; }; } { echo "$as_me:$LINENO: checking build system type" >&5 echo $ECHO_N "checking build system type... $ECHO_C" >&6; } if test "${ac_cv_build+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 echo "$as_me: error: cannot guess build type; you must specify one" >&2;} { (exit 1); exit 1; }; } ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} { (exit 1); exit 1; }; } fi { echo "$as_me:$LINENO: result: $ac_cv_build" >&5 echo "${ECHO_T}$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 echo "$as_me: error: invalid value of canonical build" >&2;} { (exit 1); exit 1; }; };; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { echo "$as_me:$LINENO: checking host system type" >&5 echo $ECHO_N "checking host system type... $ECHO_C" >&6; } if test "${ac_cv_host+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} { (exit 1); exit 1; }; } fi fi { echo "$as_me:$LINENO: result: $ac_cv_host" >&5 echo "${ECHO_T}$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 echo "$as_me: error: invalid value of canonical host" >&2;} { (exit 1); exit 1; }; };; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { echo "$as_me:$LINENO: checking for ld used by GCC" >&5 echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | [A-Za-z]:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the path of ld ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { echo "$as_me:$LINENO: checking for GNU ld" >&5 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; } else { echo "$as_me:$LINENO: checking for non-GNU ld" >&5 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; } fi if test "${acl_cv_path_LD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$LD"; then IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then acl_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in *GNU* | *'with BFD'*) test "$with_gnu_ld" != no && break ;; *) test "$with_gnu_ld" != yes && break ;; esac fi done IFS="$ac_save_ifs" else acl_cv_path_LD="$LD" # Let the user override the test with a path. fi fi LD="$acl_cv_path_LD" if test -n "$LD"; then { echo "$as_me:$LINENO: result: $LD" >&5 echo "${ECHO_T}$LD" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} { (exit 1); exit 1; }; } { echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; } if test "${acl_cv_prog_gnu_ld+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # I'd rather use --version here, but apparently some GNU ld's only accept -v. case `$LD -v 2>&1 &5 echo "${ECHO_T}$acl_cv_prog_gnu_ld" >&6; } with_gnu_ld=$acl_cv_prog_gnu_ld { echo "$as_me:$LINENO: checking for shared library run path origin" >&5 echo $ECHO_N "checking for shared library run path origin... $ECHO_C" >&6; } if test "${acl_cv_rpath+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh . ./conftest.sh rm -f ./conftest.sh acl_cv_rpath=done fi { echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5 echo "${ECHO_T}$acl_cv_rpath" >&6; } wl="$acl_cv_wl" libext="$acl_cv_libext" shlibext="$acl_cv_shlibext" hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" hardcode_direct="$acl_cv_hardcode_direct" hardcode_minus_L="$acl_cv_hardcode_minus_L" # Check whether --enable-rpath was given. if test "${enable_rpath+set}" = set; then enableval=$enable_rpath; : else enable_rpath=yes fi acl_libdirstem=lib searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` if test -n "$searchpath"; then acl_save_IFS="${IFS= }"; IFS=":" for searchdir in $searchpath; do if test -d "$searchdir"; then case "$searchdir" in */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; *) searchdir=`cd "$searchdir" && pwd` case "$searchdir" in */lib64 ) acl_libdirstem=lib64 ;; esac ;; esac fi done IFS="$acl_save_IFS" fi use_additional=yes acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" # Check whether --with-libiconv-prefix was given. if test "${with_libiconv_prefix+set}" = set; then withval=$with_libiconv_prefix; if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" fi fi fi LIBICONV= LTLIBICONV= INCICONV= rpathdirs= ltrpathdirs= names_already_handled= names_next_round='iconv ' while test -n "$names_next_round"; do names_this_round="$names_next_round" names_next_round= for name in $names_this_round; do already_handled= for n in $names_already_handled; do if test "$n" = "$name"; then already_handled=yes break fi done if test -z "$already_handled"; then names_already_handled="$names_already_handled $name" uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` eval value=\"\$HAVE_LIB$uppername\" if test -n "$value"; then if test "$value" = yes; then eval value=\"\$LIB$uppername\" test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value" eval value=\"\$LTLIB$uppername\" test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value" else : fi else found_dir= found_la= found_so= found_a= if test $use_additional = yes; then if test -n "$shlibext" \ && { test -f "$additional_libdir/lib$name.$shlibext" \ || { test "$shlibext" = dll \ && test -f "$additional_libdir/lib$name.dll.a"; }; }; then found_dir="$additional_libdir" if test -f "$additional_libdir/lib$name.$shlibext"; then found_so="$additional_libdir/lib$name.$shlibext" else found_so="$additional_libdir/lib$name.dll.a" fi if test -f "$additional_libdir/lib$name.la"; then found_la="$additional_libdir/lib$name.la" fi else if test -f "$additional_libdir/lib$name.$libext"; then found_dir="$additional_libdir" found_a="$additional_libdir/lib$name.$libext" if test -f "$additional_libdir/lib$name.la"; then found_la="$additional_libdir/lib$name.la" fi fi fi fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" case "$x" in -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` if test -n "$shlibext" \ && { test -f "$dir/lib$name.$shlibext" \ || { test "$shlibext" = dll \ && test -f "$dir/lib$name.dll.a"; }; }; then found_dir="$dir" if test -f "$dir/lib$name.$shlibext"; then found_so="$dir/lib$name.$shlibext" else found_so="$dir/lib$name.dll.a" fi if test -f "$dir/lib$name.la"; then found_la="$dir/lib$name.la" fi else if test -f "$dir/lib$name.$libext"; then found_dir="$dir" found_a="$dir/lib$name.$libext" if test -f "$dir/lib$name.la"; then found_la="$dir/lib$name.la" fi fi fi ;; esac if test "X$found_dir" != "X"; then break fi done fi if test "X$found_dir" != "X"; then LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name" if test "X$found_so" != "X"; then if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" else haveit= for x in $ltrpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $found_dir" fi if test "$hardcode_direct" = yes; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" else if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" haveit= for x in $rpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $found_dir" fi else haveit= for x in $LDFLAGS $LIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir" fi if test "$hardcode_minus_L" != no; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" else LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" fi fi fi fi else if test "X$found_a" != "X"; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a" else LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name" fi fi additional_includedir= case "$found_dir" in */$acl_libdirstem | */$acl_libdirstem/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` additional_includedir="$basedir/include" ;; esac if test "X$additional_includedir" != "X"; then if test "X$additional_includedir" != "X/usr/include"; then haveit= if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then for x in $CPPFLAGS $INCICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_includedir"; then INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir" fi fi fi fi fi if test -n "$found_la"; then save_libdir="$libdir" case "$found_la" in */* | *\\*) . "$found_la" ;; *) . "./$found_la" ;; esac libdir="$save_libdir" for dep in $dependency_libs; do case "$dep" in -L*) additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then haveit= if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then haveit= for x in $LDFLAGS $LIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir" fi fi haveit= for x in $LDFLAGS $LTLIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir" fi fi fi fi ;; -R*) dir=`echo "X$dep" | sed -e 's/^X-R//'` if test "$enable_rpath" != no; then haveit= for x in $rpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $dir" fi haveit= for x in $ltrpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $dir" fi fi ;; -l*) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` ;; *.la) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` ;; *) LIBICONV="${LIBICONV}${LIBICONV:+ }$dep" LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep" ;; esac done fi else LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name" fi fi fi done done if test "X$rpathdirs" != "X"; then if test -n "$hardcode_libdir_separator"; then alldirs= for found_dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" done acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" else for found_dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$found_dir" eval flag=\"$hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" done fi fi if test "X$ltrpathdirs" != "X"; then for found_dir in $ltrpathdirs; do LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir" done fi am_save_CPPFLAGS="$CPPFLAGS" for element in $INCICONV; do haveit= for x in $CPPFLAGS; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X$element"; then haveit=yes break fi done if test -z "$haveit"; then CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" fi done { echo "$as_me:$LINENO: checking for iconv" >&5 echo $ECHO_N "checking for iconv... $ECHO_C" >&6; } if test "${am_cv_func_iconv+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then am_cv_func_iconv=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test "$am_cv_func_iconv" != yes; then am_save_LIBS="$LIBS" LIBS="$LIBS $LIBICONV" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then am_cv_lib_iconv=yes am_cv_func_iconv=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS="$am_save_LIBS" fi fi { echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5 echo "${ECHO_T}$am_cv_func_iconv" >&6; } if test "$am_cv_func_iconv" = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_ICONV 1 _ACEOF fi if test "$am_cv_lib_iconv" = yes; then { echo "$as_me:$LINENO: checking how to link with libiconv" >&5 echo $ECHO_N "checking how to link with libiconv... $ECHO_C" >&6; } { echo "$as_me:$LINENO: result: $LIBICONV" >&5 echo "${ECHO_T}$LIBICONV" >&6; } else CPPFLAGS="$am_save_CPPFLAGS" LIBICONV= LTLIBICONV= fi if test "$am_cv_func_iconv" = yes; then { echo "$as_me:$LINENO: checking for iconv declaration" >&5 echo $ECHO_N "checking for iconv declaration... $ECHO_C" >&6; } if test "${am_cv_proto_iconv+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include extern #ifdef __cplusplus "C" #endif #if defined(__STDC__) || defined(__cplusplus) size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); #else size_t iconv(); #endif int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then am_cv_proto_iconv_arg1="" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 am_cv_proto_iconv_arg1="const" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);" fi am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` { echo "$as_me:$LINENO: result: ${ac_t:- }$am_cv_proto_iconv" >&5 echo "${ECHO_T}${ac_t:- }$am_cv_proto_iconv" >&6; } cat >>confdefs.h <<_ACEOF #define ICONV_CONST $am_cv_proto_iconv_arg1 _ACEOF fi unset BASH if test "x$SH" = x ; then # Extract the first word of "bash", so it can be a program name with args. set dummy bash; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_BASH+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $BASH in [\\/]* | ?:[\\/]*) ac_cv_path_BASH="$BASH" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_BASH" && ac_cv_path_BASH="NONE" ;; esac fi BASH=$ac_cv_path_BASH if test -n "$BASH"; then { echo "$as_me:$LINENO: result: $BASH" >&5 echo "${ECHO_T}$BASH" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test ! "x$BASH" = xNONE ; then if $BASH -posix -c true ; then SH="$BASH -posix" elif $BASH --posix -c true ; then SH="$BASH --posix" fi echo "Using $SH". fi fi if test "x$SH" = x ; then # Extract the first word of "ksh", so it can be a program name with args. set dummy ksh; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_KSH+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $KSH in [\\/]* | ?:[\\/]*) ac_cv_path_KSH="$KSH" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_KSH="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_KSH" && ac_cv_path_KSH="NONE" ;; esac fi KSH=$ac_cv_path_KSH if test -n "$KSH"; then { echo "$as_me:$LINENO: result: $KSH" >&5 echo "${ECHO_T}$KSH" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test ! "x$KSH" = xNONE ; then SH="$KSH" echo "Using $SH". fi fi if test "x$SH" = x ; then # Extract the first word of "sh", so it can be a program name with args. set dummy sh; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_BINSH+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $BINSH in [\\/]* | ?:[\\/]*) ac_cv_path_BINSH="$BINSH" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_BINSH="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_BINSH" && ac_cv_path_BINSH="NONE" ;; esac fi BINSH=$ac_cv_path_BINSH if test -n "$BINSH"; then { echo "$as_me:$LINENO: result: $BINSH" >&5 echo "${ECHO_T}$BINSH" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$BINSH" = xNONE; then echo "ERROR: Can't find sh." >&2 exit 1 else SH="$BINSH" fi fi # Extract the first word of "awk", so it can be a program name with args. set dummy awk; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_AWK+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $AWK in [\\/]* | ?:[\\/]*) ac_cv_path_AWK="$AWK" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_AWK" && ac_cv_path_AWK="NONE" ;; esac fi AWK=$ac_cv_path_AWK if test -n "$AWK"; then { echo "$as_me:$LINENO: result: $AWK" >&5 echo "${ECHO_T}$AWK" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi # Extract the first word of "mawk", so it can be a program name with args. set dummy mawk; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_MAWK+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $MAWK in [\\/]* | ?:[\\/]*) ac_cv_path_MAWK="$MAWK" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_MAWK="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_MAWK" && ac_cv_path_MAWK="NONE" ;; esac fi MAWK=$ac_cv_path_MAWK if test -n "$MAWK"; then { echo "$as_me:$LINENO: result: $MAWK" >&5 echo "${ECHO_T}$MAWK" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi # Extract the first word of "gawk", so it can be a program name with args. set dummy gawk; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_GAWK+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $GAWK in [\\/]* | ?:[\\/]*) ac_cv_path_GAWK="$GAWK" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_GAWK="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_GAWK" && ac_cv_path_GAWK="NONE" ;; esac fi GAWK=$ac_cv_path_GAWK if test -n "$GAWK"; then { echo "$as_me:$LINENO: result: $GAWK" >&5 echo "${ECHO_T}$GAWK" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi # Extract the first word of "nawk", so it can be a program name with args. set dummy nawk; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_NAWK+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $NAWK in [\\/]* | ?:[\\/]*) ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_NAWK" && ac_cv_path_NAWK="NONE" ;; esac fi NAWK=$ac_cv_path_NAWK if test -n "$NAWK"; then { echo "$as_me:$LINENO: result: $NAWK" >&5 echo "${ECHO_T}$NAWK" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$AWK" != "xNONE" ; then AWK="$AWK" fi if test "x$NAWK" != "xNONE" ; then AWK="$NAWK" fi if test "x$GAWK" != "xNONE" ; then AWK="$GAWK" fi if test "x$MAWK" != "xNONE" ; then AWK="$MAWK" fi # Extract the first word of "tac", so it can be a program name with args. set dummy tac; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_TAC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $TAC in [\\/]* | ?:[\\/]*) ac_cv_path_TAC="$TAC" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_TAC="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_TAC" && ac_cv_path_TAC="NONE" ;; esac fi TAC=$ac_cv_path_TAC if test -n "$TAC"; then { echo "$as_me:$LINENO: result: $TAC" >&5 echo "${ECHO_T}$TAC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$TAC" = "xNONE"; then TACTARGET="tac" TACAWK="tac.awk" TAC="$libdir/tac" fi # Check whether --enable-lbdb_dotlock was given. if test "${enable_lbdb_dotlock+set}" = set; then enableval=$enable_lbdb_dotlock; lbdb_cv_lbdb_dotlock="$enableval" fi # Extract the first word of "mutt.dotlock", so it can be a program name with args. set dummy mutt.dotlock; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_DOTLOCK_OLD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $DOTLOCK_OLD in [\\/]* | ?:[\\/]*) ac_cv_path_DOTLOCK_OLD="$DOTLOCK_OLD" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_DOTLOCK_OLD="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_DOTLOCK_OLD" && ac_cv_path_DOTLOCK_OLD="no" ;; esac fi DOTLOCK_OLD=$ac_cv_path_DOTLOCK_OLD if test -n "$DOTLOCK_OLD"; then { echo "$as_me:$LINENO: result: $DOTLOCK_OLD" >&5 echo "${ECHO_T}$DOTLOCK_OLD" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test x$ac_cv_path_DOTLOCK_OLD = xno ; then # Extract the first word of "mutt_dotlock", so it can be a program name with args. set dummy mutt_dotlock; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_DOTLOCK+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $DOTLOCK in [\\/]* | ?:[\\/]*) ac_cv_path_DOTLOCK="$DOTLOCK" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_DOTLOCK="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_DOTLOCK" && ac_cv_path_DOTLOCK="no" ;; esac fi DOTLOCK=$ac_cv_path_DOTLOCK if test -n "$DOTLOCK"; then { echo "$as_me:$LINENO: result: $DOTLOCK" >&5 echo "${ECHO_T}$DOTLOCK" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi else ac_cv_path_DOTLOCK=$ac_cv_path_DOTLOCK_OLD fi if test x$ac_cv_path_DOTLOCK = xno || test x$lbdb_cv_lbdb_dotlock = xyes then DOTLOCK_TARGET="lbdb_dotlock" DOTLOCK="$bindir"/lbdb_dotlock fi DOTLOCKBASE=`basename $DOTLOCK` path_fetchaddr="$libdir/fetchaddr" # # LBDB_ARG_WITH(FOO, foo, m_foo, [with foo support]) # # several cases: # --with-foo - search for foo in PATH. error if not found # --with-foo=/foo - use /foo # --without-foo - completely disable this # none of the above - search for foo in PATH. disable if not found # MODULES="m_inmail m_passwd m_muttalias m_pine m_gnomecard m_bbdb m_wanderlust" withval="" # Check whether --with-finger was given. if test "${with_finger+set}" = set; then withval=$with_finger; fi if test x$withval = xyes; then # Extract the first word of "finger", so it can be a program name with args. set dummy finger; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_FINGER+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $FINGER in [\\/]* | ?:[\\/]*) ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_FINGER="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER=""no"" ;; esac fi FINGER=$ac_cv_path_FINGER if test -n "$FINGER"; then { echo "$as_me:$LINENO: result: $FINGER" >&5 echo "${ECHO_T}$FINGER" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test x$FINGER = xno; then { { echo "$as_me:$LINENO: error: finger not in PATH" >&5 echo "$as_me: error: finger not in PATH" >&2;} { (exit 1); exit 1; }; } else MODULES="$MODULES m_finger" fi elif test x$withval = x; then # Extract the first word of "finger", so it can be a program name with args. set dummy finger; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_FINGER+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $FINGER in [\\/]* | ?:[\\/]*) ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_FINGER="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER=""no"" ;; esac fi FINGER=$ac_cv_path_FINGER if test -n "$FINGER"; then { echo "$as_me:$LINENO: result: $FINGER" >&5 echo "${ECHO_T}$FINGER" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test x$FINGER != xno; then MODULES="$MODULES m_finger" fi elif test x$withval != xno; then FINGER=$withval MODULES="$MODULES m_finger" fi withval="" # Check whether --with-abook was given. if test "${with_abook+set}" = set; then withval=$with_abook; fi if test x$withval = xyes; then # Extract the first word of "abook", so it can be a program name with args. set dummy abook; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_ABOOK+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $ABOOK in [\\/]* | ?:[\\/]*) ac_cv_path_ABOOK="$ABOOK" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_ABOOK="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_ABOOK" && ac_cv_path_ABOOK=""no"" ;; esac fi ABOOK=$ac_cv_path_ABOOK if test -n "$ABOOK"; then { echo "$as_me:$LINENO: result: $ABOOK" >&5 echo "${ECHO_T}$ABOOK" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test x$ABOOK = xno; then { { echo "$as_me:$LINENO: error: abook not in PATH" >&5 echo "$as_me: error: abook not in PATH" >&2;} { (exit 1); exit 1; }; } else MODULES="$MODULES m_abook" fi elif test x$withval = x; then # Extract the first word of "abook", so it can be a program name with args. set dummy abook; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_ABOOK+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $ABOOK in [\\/]* | ?:[\\/]*) ac_cv_path_ABOOK="$ABOOK" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_ABOOK="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_ABOOK" && ac_cv_path_ABOOK=""no"" ;; esac fi ABOOK=$ac_cv_path_ABOOK if test -n "$ABOOK"; then { echo "$as_me:$LINENO: result: $ABOOK" >&5 echo "${ECHO_T}$ABOOK" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test x$ABOOK != xno; then MODULES="$MODULES m_abook" fi elif test x$withval != xno; then ABOOK=$withval MODULES="$MODULES m_abook" fi withval="" # Check whether --with-addr-email was given. if test "${with_addr_email+set}" = set; then withval=$with_addr_email; fi if test x$withval = xyes; then # Extract the first word of "addr-email", so it can be a program name with args. set dummy addr-email; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_ADDR_EMAIL+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $ADDR_EMAIL in [\\/]* | ?:[\\/]*) ac_cv_path_ADDR_EMAIL="$ADDR_EMAIL" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_ADDR_EMAIL="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_ADDR_EMAIL" && ac_cv_path_ADDR_EMAIL=""no"" ;; esac fi ADDR_EMAIL=$ac_cv_path_ADDR_EMAIL if test -n "$ADDR_EMAIL"; then { echo "$as_me:$LINENO: result: $ADDR_EMAIL" >&5 echo "${ECHO_T}$ADDR_EMAIL" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test x$ADDR_EMAIL = xno; then { { echo "$as_me:$LINENO: error: addr-email not in PATH" >&5 echo "$as_me: error: addr-email not in PATH" >&2;} { (exit 1); exit 1; }; } else MODULES="$MODULES m_addr_email" fi elif test x$withval = x; then # Extract the first word of "addr-email", so it can be a program name with args. set dummy addr-email; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_ADDR_EMAIL+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $ADDR_EMAIL in [\\/]* | ?:[\\/]*) ac_cv_path_ADDR_EMAIL="$ADDR_EMAIL" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_ADDR_EMAIL="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_ADDR_EMAIL" && ac_cv_path_ADDR_EMAIL=""no"" ;; esac fi ADDR_EMAIL=$ac_cv_path_ADDR_EMAIL if test -n "$ADDR_EMAIL"; then { echo "$as_me:$LINENO: result: $ADDR_EMAIL" >&5 echo "${ECHO_T}$ADDR_EMAIL" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test x$ADDR_EMAIL != xno; then MODULES="$MODULES m_addr_email" fi elif test x$withval != xno; then ADDR_EMAIL=$withval MODULES="$MODULES m_addr_email" fi withval="" # Check whether --with-ypcat was given. if test "${with_ypcat+set}" = set; then withval=$with_ypcat; fi if test x$withval = xyes; then # Extract the first word of "ypcat", so it can be a program name with args. set dummy ypcat; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_YPCAT+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $YPCAT in [\\/]* | ?:[\\/]*) ac_cv_path_YPCAT="$YPCAT" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_YPCAT="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_YPCAT" && ac_cv_path_YPCAT=""no"" ;; esac fi YPCAT=$ac_cv_path_YPCAT if test -n "$YPCAT"; then { echo "$as_me:$LINENO: result: $YPCAT" >&5 echo "${ECHO_T}$YPCAT" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test x$YPCAT = xno; then { { echo "$as_me:$LINENO: error: ypcat not in PATH" >&5 echo "$as_me: error: ypcat not in PATH" >&2;} { (exit 1); exit 1; }; } else MODULES="$MODULES m_yppasswd" fi elif test x$withval = x; then # Extract the first word of "ypcat", so it can be a program name with args. set dummy ypcat; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_YPCAT+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $YPCAT in [\\/]* | ?:[\\/]*) ac_cv_path_YPCAT="$YPCAT" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_YPCAT="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_YPCAT" && ac_cv_path_YPCAT=""no"" ;; esac fi YPCAT=$ac_cv_path_YPCAT if test -n "$YPCAT"; then { echo "$as_me:$LINENO: result: $YPCAT" >&5 echo "${ECHO_T}$YPCAT" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test x$YPCAT != xno; then MODULES="$MODULES m_yppasswd" fi elif test x$withval != xno; then YPCAT=$withval MODULES="$MODULES m_yppasswd" fi withval="" # Check whether --with-niscat was given. if test "${with_niscat+set}" = set; then withval=$with_niscat; fi if test x$withval = xyes; then # Extract the first word of "niscat", so it can be a program name with args. set dummy niscat; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_NISCAT+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $NISCAT in [\\/]* | ?:[\\/]*) ac_cv_path_NISCAT="$NISCAT" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_NISCAT="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_NISCAT" && ac_cv_path_NISCAT=""no"" ;; esac fi NISCAT=$ac_cv_path_NISCAT if test -n "$NISCAT"; then { echo "$as_me:$LINENO: result: $NISCAT" >&5 echo "${ECHO_T}$NISCAT" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test x$NISCAT = xno; then { { echo "$as_me:$LINENO: error: niscat not in PATH" >&5 echo "$as_me: error: niscat not in PATH" >&2;} { (exit 1); exit 1; }; } else MODULES="$MODULES m_nispasswd" fi elif test x$withval = x; then # Extract the first word of "niscat", so it can be a program name with args. set dummy niscat; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_NISCAT+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $NISCAT in [\\/]* | ?:[\\/]*) ac_cv_path_NISCAT="$NISCAT" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_NISCAT="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_NISCAT" && ac_cv_path_NISCAT=""no"" ;; esac fi NISCAT=$ac_cv_path_NISCAT if test -n "$NISCAT"; then { echo "$as_me:$LINENO: result: $NISCAT" >&5 echo "${ECHO_T}$NISCAT" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test x$NISCAT != xno; then MODULES="$MODULES m_nispasswd" fi elif test x$withval != xno; then NISCAT=$withval MODULES="$MODULES m_nispasswd" fi withval="" # Check whether --with-getent was given. if test "${with_getent+set}" = set; then withval=$with_getent; fi if test x$withval = xyes; then # Extract the first word of "getent", so it can be a program name with args. set dummy getent; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_GETENT+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $GETENT in [\\/]* | ?:[\\/]*) ac_cv_path_GETENT="$GETENT" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_GETENT="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_GETENT" && ac_cv_path_GETENT=""no"" ;; esac fi GETENT=$ac_cv_path_GETENT if test -n "$GETENT"; then { echo "$as_me:$LINENO: result: $GETENT" >&5 echo "${ECHO_T}$GETENT" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test x$GETENT = xno; then { { echo "$as_me:$LINENO: error: getent not in PATH" >&5 echo "$as_me: error: getent not in PATH" >&2;} { (exit 1); exit 1; }; } else MODULES="$MODULES m_getent" fi elif test x$withval = x; then # Extract the first word of "getent", so it can be a program name with args. set dummy getent; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_GETENT+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $GETENT in [\\/]* | ?:[\\/]*) ac_cv_path_GETENT="$GETENT" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_GETENT="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_GETENT" && ac_cv_path_GETENT=""no"" ;; esac fi GETENT=$ac_cv_path_GETENT if test -n "$GETENT"; then { echo "$as_me:$LINENO: result: $GETENT" >&5 echo "${ECHO_T}$GETENT" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test x$GETENT != xno; then MODULES="$MODULES m_getent" fi elif test x$withval != xno; then GETENT=$withval MODULES="$MODULES m_getent" fi withval="" # Check whether --with-gpg was given. if test "${with_gpg+set}" = set; then withval=$with_gpg; fi if test x$withval = xyes; then # Extract the first word of "gpg", so it can be a program name with args. set dummy gpg; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_GPG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $GPG in [\\/]* | ?:[\\/]*) ac_cv_path_GPG="$GPG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_GPG="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_GPG" && ac_cv_path_GPG=""no"" ;; esac fi GPG=$ac_cv_path_GPG if test -n "$GPG"; then { echo "$as_me:$LINENO: result: $GPG" >&5 echo "${ECHO_T}$GPG" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test x$GPG = xno; then { { echo "$as_me:$LINENO: error: gpg not in PATH" >&5 echo "$as_me: error: gpg not in PATH" >&2;} { (exit 1); exit 1; }; } else MODULES="$MODULES m_gpg" fi elif test x$withval = x; then # Extract the first word of "gpg", so it can be a program name with args. set dummy gpg; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_GPG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $GPG in [\\/]* | ?:[\\/]*) ac_cv_path_GPG="$GPG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_GPG="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_GPG" && ac_cv_path_GPG=""no"" ;; esac fi GPG=$ac_cv_path_GPG if test -n "$GPG"; then { echo "$as_me:$LINENO: result: $GPG" >&5 echo "${ECHO_T}$GPG" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test x$GPG != xno; then MODULES="$MODULES m_gpg" fi elif test x$withval != xno; then GPG=$withval MODULES="$MODULES m_gpg" fi withval="" # Check whether --with-pgpk was given. if test "${with_pgpk+set}" = set; then withval=$with_pgpk; fi if test x$withval = xyes; then # Extract the first word of "pgpk", so it can be a program name with args. set dummy pgpk; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_PGPK+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $PGPK in [\\/]* | ?:[\\/]*) ac_cv_path_PGPK="$PGPK" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PGPK="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_PGPK" && ac_cv_path_PGPK=""no"" ;; esac fi PGPK=$ac_cv_path_PGPK if test -n "$PGPK"; then { echo "$as_me:$LINENO: result: $PGPK" >&5 echo "${ECHO_T}$PGPK" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test x$PGPK = xno; then { { echo "$as_me:$LINENO: error: pgpk not in PATH" >&5 echo "$as_me: error: pgpk not in PATH" >&2;} { (exit 1); exit 1; }; } else MODULES="$MODULES m_pgp5" fi elif test x$withval = x; then # Extract the first word of "pgpk", so it can be a program name with args. set dummy pgpk; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_PGPK+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $PGPK in [\\/]* | ?:[\\/]*) ac_cv_path_PGPK="$PGPK" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PGPK="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_PGPK" && ac_cv_path_PGPK=""no"" ;; esac fi PGPK=$ac_cv_path_PGPK if test -n "$PGPK"; then { echo "$as_me:$LINENO: result: $PGPK" >&5 echo "${ECHO_T}$PGPK" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test x$PGPK != xno; then MODULES="$MODULES m_pgp5" fi elif test x$withval != xno; then PGPK=$withval MODULES="$MODULES m_pgp5" fi withval="" # Check whether --with-pgp was given. if test "${with_pgp+set}" = set; then withval=$with_pgp; fi if test x$withval = xyes; then # Extract the first word of "pgp", so it can be a program name with args. set dummy pgp; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_PGP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $PGP in [\\/]* | ?:[\\/]*) ac_cv_path_PGP="$PGP" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PGP="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_PGP" && ac_cv_path_PGP=""no"" ;; esac fi PGP=$ac_cv_path_PGP if test -n "$PGP"; then { echo "$as_me:$LINENO: result: $PGP" >&5 echo "${ECHO_T}$PGP" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test x$PGP = xno; then { { echo "$as_me:$LINENO: error: pgp not in PATH" >&5 echo "$as_me: error: pgp not in PATH" >&2;} { (exit 1); exit 1; }; } else MODULES="$MODULES m_pgp2" fi elif test x$withval = x; then # Extract the first word of "pgp", so it can be a program name with args. set dummy pgp; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_PGP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $PGP in [\\/]* | ?:[\\/]*) ac_cv_path_PGP="$PGP" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PGP="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_PGP" && ac_cv_path_PGP=""no"" ;; esac fi PGP=$ac_cv_path_PGP if test -n "$PGP"; then { echo "$as_me:$LINENO: result: $PGP" >&5 echo "${ECHO_T}$PGP" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test x$PGP != xno; then MODULES="$MODULES m_pgp2" fi elif test x$withval != xno; then PGP=$withval MODULES="$MODULES m_pgp2" fi withval="" # Check whether --with-evolution-addressbook-export was given. if test "${with_evolution_addressbook_export+set}" = set; then withval=$with_evolution_addressbook_export; fi if test x$withval = xyes; then # Extract the first word of "evolution-addressbook-export", so it can be a program name with args. set dummy evolution-addressbook-export; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_EVOLUTION_ADDRESSBOOK_EXPORT+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $EVOLUTION_ADDRESSBOOK_EXPORT in [\\/]* | ?:[\\/]*) ac_cv_path_EVOLUTION_ADDRESSBOOK_EXPORT="$EVOLUTION_ADDRESSBOOK_EXPORT" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_EVOLUTION_ADDRESSBOOK_EXPORT="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_EVOLUTION_ADDRESSBOOK_EXPORT" && ac_cv_path_EVOLUTION_ADDRESSBOOK_EXPORT=""no"" ;; esac fi EVOLUTION_ADDRESSBOOK_EXPORT=$ac_cv_path_EVOLUTION_ADDRESSBOOK_EXPORT if test -n "$EVOLUTION_ADDRESSBOOK_EXPORT"; then { echo "$as_me:$LINENO: result: $EVOLUTION_ADDRESSBOOK_EXPORT" >&5 echo "${ECHO_T}$EVOLUTION_ADDRESSBOOK_EXPORT" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test x$EVOLUTION_ADDRESSBOOK_EXPORT = xno; then { { echo "$as_me:$LINENO: error: evolution-addressbook-export not in PATH" >&5 echo "$as_me: error: evolution-addressbook-export not in PATH" >&2;} { (exit 1); exit 1; }; } else MODULES="$MODULES m_evolution" fi elif test x$withval = x; then # Extract the first word of "evolution-addressbook-export", so it can be a program name with args. set dummy evolution-addressbook-export; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_EVOLUTION_ADDRESSBOOK_EXPORT+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $EVOLUTION_ADDRESSBOOK_EXPORT in [\\/]* | ?:[\\/]*) ac_cv_path_EVOLUTION_ADDRESSBOOK_EXPORT="$EVOLUTION_ADDRESSBOOK_EXPORT" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_EVOLUTION_ADDRESSBOOK_EXPORT="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_EVOLUTION_ADDRESSBOOK_EXPORT" && ac_cv_path_EVOLUTION_ADDRESSBOOK_EXPORT=""no"" ;; esac fi EVOLUTION_ADDRESSBOOK_EXPORT=$ac_cv_path_EVOLUTION_ADDRESSBOOK_EXPORT if test -n "$EVOLUTION_ADDRESSBOOK_EXPORT"; then { echo "$as_me:$LINENO: result: $EVOLUTION_ADDRESSBOOK_EXPORT" >&5 echo "${ECHO_T}$EVOLUTION_ADDRESSBOOK_EXPORT" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test x$EVOLUTION_ADDRESSBOOK_EXPORT != xno; then MODULES="$MODULES m_evolution" fi elif test x$withval != xno; then EVOLUTION_ADDRESSBOOK_EXPORT=$withval MODULES="$MODULES m_evolution" fi # Extract the first word of "perl", so it can be a program name with args. set dummy perl; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_PERL+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $PERL in [\\/]* | ?:[\\/]*) ac_cv_path_PERL="$PERL" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_PERL" && ac_cv_path_PERL=""no"" ;; esac fi PERL=$ac_cv_path_PERL if test -n "$PERL"; then { echo "$as_me:$LINENO: result: $PERL" >&5 echo "${ECHO_T}$PERL" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$PERL" != xno ; then # m_fido needs nodelist2lbdb, which needs perl # m_palm needs palm_lsaddr, which needs perl # m_ldap needs mutt_ldap_query which is written in perl MODULES="$MODULES m_fido m_palm m_ldap" fi # m_osx_addressbook requires xcode (10.3) or projectbuilder (<10.3) # Extract the first word of "xcodebuild", so it can be a program name with args. set dummy xcodebuild; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_XCODEBUILD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $XCODEBUILD in [\\/]* | ?:[\\/]*) ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD=""no"" ;; esac fi XCODEBUILD=$ac_cv_path_XCODEBUILD if test -n "$XCODEBUILD"; then { echo "$as_me:$LINENO: result: $XCODEBUILD" >&5 echo "${ECHO_T}$XCODEBUILD" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$XCODEBUILD" != xno; then MODULES="$MODULES m_osx_addressbook" else # Extract the first word of "pbxbuild", so it can be a program name with args. set dummy pbxbuild; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_PBXBUILD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $PBXBUILD in [\\/]* | ?:[\\/]*) ac_cv_path_PBXBUILD="$PBXBUILD" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PBXBUILD="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_PBXBUILD" && ac_cv_path_PBXBUILD=""no"" ;; esac fi PBXBUILD=$ac_cv_path_PBXBUILD if test -n "$PBXBUILD"; then { echo "$as_me:$LINENO: result: $PBXBUILD" >&5 echo "${ECHO_T}$PBXBUILD" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$PBXBUILD" != xno ; then MODULES="$MODULES m_osx_addressbook" fi fi VFORMAT="no" if test "${ac_cv_header_vf_iface_h+set}" = set; then { echo "$as_me:$LINENO: checking for vf_iface.h" >&5 echo $ECHO_N "checking for vf_iface.h... $ECHO_C" >&6; } if test "${ac_cv_header_vf_iface_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi { echo "$as_me:$LINENO: result: $ac_cv_header_vf_iface_h" >&5 echo "${ECHO_T}$ac_cv_header_vf_iface_h" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking vf_iface.h usability" >&5 echo $ECHO_N "checking vf_iface.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking vf_iface.h presence" >&5 echo $ECHO_N "checking vf_iface.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: vf_iface.h: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: vf_iface.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: vf_iface.h: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: vf_iface.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: vf_iface.h: present but cannot be compiled" >&5 echo "$as_me: WARNING: vf_iface.h: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: vf_iface.h: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: vf_iface.h: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: vf_iface.h: see the Autoconf documentation" >&5 echo "$as_me: WARNING: vf_iface.h: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: vf_iface.h: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: vf_iface.h: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: vf_iface.h: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: vf_iface.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: vf_iface.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: vf_iface.h: in the future, the compiler will take precedence" >&2;} ;; esac { echo "$as_me:$LINENO: checking for vf_iface.h" >&5 echo $ECHO_N "checking for vf_iface.h... $ECHO_C" >&6; } if test "${ac_cv_header_vf_iface_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_vf_iface_h=$ac_header_preproc fi { echo "$as_me:$LINENO: result: $ac_cv_header_vf_iface_h" >&5 echo "${ECHO_T}$ac_cv_header_vf_iface_h" >&6; } fi if test $ac_cv_header_vf_iface_h = yes; then { echo "$as_me:$LINENO: checking for vf_read_file in -lvformat" >&5 echo $ECHO_N "checking for vf_read_file in -lvformat... $ECHO_C" >&6; } if test "${ac_cv_lib_vformat_vf_read_file+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lvformat $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char vf_read_file (); int main () { return vf_read_file (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_vformat_vf_read_file=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_vformat_vf_read_file=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_vformat_vf_read_file" >&5 echo "${ECHO_T}$ac_cv_lib_vformat_vf_read_file" >&6; } if test $ac_cv_lib_vformat_vf_read_file = yes; then MODULES="$MODULES m_vcf" VFORMAT="yes" fi fi MODULES_SH="" for i in $MODULES ; do MODULES_SH="$MODULES_SH $i.sh" done LBDB_VERSION=`sed -e '2,10000d;s/^.*(\(.*\)).*$/\1/' < debian/changelog` ac_config_files="$ac_config_files Makefile lbdbq.sh munge.awk munge-keeporder.awk lbdb-fetchaddr.sh lbdb-munge.sh lbdb_lib.sh nodelist2lbdb.pl palm_lsaddr.pl mutt_ldap_query.pl $MODULES_SH $TACAWK lbdb.spec lbdb.rc" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( *) $as_unset $ac_var ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then test "x$cache_file" != "x/dev/null" && { echo "$as_me:$LINENO: updating cache $cache_file" >&5 echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. # # If the first sed substitution is executed (which looks for macros that # take arguments), then branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. ac_script=' t clear :clear s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g t quote s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g t quote b any :quote s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g s/\[/\\&/g s/\]/\\&/g s/\$/$$/g H :any ${ g s/^\n// s/\n/ /g p } ' DEFS=`sed -n "$ac_script" confdefs.h` ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # PATH needs CR # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) as_nl=' ' IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # CDPATH. $as_unset CDPATH as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, and appends # trailing '-' during substitution so that $LINENO is not a special # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # scripts with optimization help from Paolo Bonzini. Blame Lee # E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 # Save the log message, to keep $[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by $as_me, which was generated by GNU Autoconf 2.61. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # Files that config.status was made for. config_files="$ac_config_files" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE Configuration files: $config_files Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ config.status configured by $0, generated by GNU Autoconf 2.61, with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2006 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # If no file are specified by the user, then we need to provide default # value. By we need to know if files were specified by the user. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) echo "$ac_cs_version"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; --he | --h | --help | --hel | -h ) echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) { echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *) ac_config_targets="$ac_config_targets $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 CONFIG_SHELL=$SHELL export CONFIG_SHELL exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "lbdbq.sh") CONFIG_FILES="$CONFIG_FILES lbdbq.sh" ;; "munge.awk") CONFIG_FILES="$CONFIG_FILES munge.awk" ;; "munge-keeporder.awk") CONFIG_FILES="$CONFIG_FILES munge-keeporder.awk" ;; "lbdb-fetchaddr.sh") CONFIG_FILES="$CONFIG_FILES lbdb-fetchaddr.sh" ;; "lbdb-munge.sh") CONFIG_FILES="$CONFIG_FILES lbdb-munge.sh" ;; "lbdb_lib.sh") CONFIG_FILES="$CONFIG_FILES lbdb_lib.sh" ;; "nodelist2lbdb.pl") CONFIG_FILES="$CONFIG_FILES nodelist2lbdb.pl" ;; "palm_lsaddr.pl") CONFIG_FILES="$CONFIG_FILES palm_lsaddr.pl" ;; "mutt_ldap_query.pl") CONFIG_FILES="$CONFIG_FILES mutt_ldap_query.pl" ;; "$MODULES_SH") CONFIG_FILES="$CONFIG_FILES $MODULES_SH" ;; "$TACAWK") CONFIG_FILES="$CONFIG_FILES $TACAWK" ;; "lbdb.spec") CONFIG_FILES="$CONFIG_FILES lbdb.spec" ;; "lbdb.rc") CONFIG_FILES="$CONFIG_FILES lbdb.rc" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= trap 'exit_status=$? { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } # # Set up the sed scripts for CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h if test -n "$CONFIG_FILES"; then _ACEOF ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF SHELL!$SHELL$ac_delim PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim PACKAGE_NAME!$PACKAGE_NAME$ac_delim PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim PACKAGE_STRING!$PACKAGE_STRING$ac_delim PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim exec_prefix!$exec_prefix$ac_delim prefix!$prefix$ac_delim program_transform_name!$program_transform_name$ac_delim bindir!$bindir$ac_delim sbindir!$sbindir$ac_delim libexecdir!$libexecdir$ac_delim datarootdir!$datarootdir$ac_delim datadir!$datadir$ac_delim sysconfdir!$sysconfdir$ac_delim sharedstatedir!$sharedstatedir$ac_delim localstatedir!$localstatedir$ac_delim includedir!$includedir$ac_delim oldincludedir!$oldincludedir$ac_delim docdir!$docdir$ac_delim infodir!$infodir$ac_delim htmldir!$htmldir$ac_delim dvidir!$dvidir$ac_delim pdfdir!$pdfdir$ac_delim psdir!$psdir$ac_delim libdir!$libdir$ac_delim localedir!$localedir$ac_delim mandir!$mandir$ac_delim DEFS!$DEFS$ac_delim ECHO_C!$ECHO_C$ac_delim ECHO_N!$ECHO_N$ac_delim ECHO_T!$ECHO_T$ac_delim LIBS!$LIBS$ac_delim build_alias!$build_alias$ac_delim host_alias!$host_alias$ac_delim target_alias!$target_alias$ac_delim CC!$CC$ac_delim CFLAGS!$CFLAGS$ac_delim LDFLAGS!$LDFLAGS$ac_delim CPPFLAGS!$CPPFLAGS$ac_delim ac_ct_CC!$ac_ct_CC$ac_delim EXEEXT!$EXEEXT$ac_delim OBJEXT!$OBJEXT$ac_delim INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim INSTALL_DATA!$INSTALL_DATA$ac_delim CPP!$CPP$ac_delim GREP!$GREP$ac_delim EGREP!$EGREP$ac_delim build!$build$ac_delim build_cpu!$build_cpu$ac_delim build_vendor!$build_vendor$ac_delim build_os!$build_os$ac_delim host!$host$ac_delim host_cpu!$host_cpu$ac_delim host_vendor!$host_vendor$ac_delim host_os!$host_os$ac_delim LIBICONV!$LIBICONV$ac_delim LTLIBICONV!$LTLIBICONV$ac_delim BASH!$BASH$ac_delim KSH!$KSH$ac_delim BINSH!$BINSH$ac_delim SH!$SH$ac_delim AWK!$AWK$ac_delim MAWK!$MAWK$ac_delim GAWK!$GAWK$ac_delim NAWK!$NAWK$ac_delim TAC!$TAC$ac_delim TACTARGET!$TACTARGET$ac_delim DOTLOCK_OLD!$DOTLOCK_OLD$ac_delim DOTLOCK!$DOTLOCK$ac_delim DOTLOCK_TARGET!$DOTLOCK_TARGET$ac_delim DOTLOCKBASE!$DOTLOCKBASE$ac_delim path_fetchaddr!$path_fetchaddr$ac_delim FINGER!$FINGER$ac_delim ABOOK!$ABOOK$ac_delim ADDR_EMAIL!$ADDR_EMAIL$ac_delim YPCAT!$YPCAT$ac_delim NISCAT!$NISCAT$ac_delim GETENT!$GETENT$ac_delim GPG!$GPG$ac_delim PGPK!$PGPK$ac_delim PGP!$PGP$ac_delim EVOLUTION_ADDRESSBOOK_EXPORT!$EVOLUTION_ADDRESSBOOK_EXPORT$ac_delim PERL!$PERL$ac_delim XCODEBUILD!$XCODEBUILD$ac_delim PBXBUILD!$PBXBUILD$ac_delim VFORMAT!$VFORMAT$ac_delim LBDB_VERSION!$LBDB_VERSION$ac_delim MODULES!$MODULES$ac_delim LIBOBJS!$LIBOBJS$ac_delim LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 93; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` if test -n "$ac_eof"; then ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` ac_eof=`expr $ac_eof + 1` fi cat >>$CONFIG_STATUS <<_ACEOF cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof /@[a-zA-Z_][a-zA-Z_0-9]*@/!b end _ACEOF sed ' s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g s/^/s,@/; s/!/@,|#_!!_#|/ :n t n s/'"$ac_delim"'$/,g/; t s/$/\\/; p N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n ' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF :end s/|#_!!_#|//g CEOF$ac_eof _ACEOF # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=/{ s/:*\$(srcdir):*/:/ s/:*\${srcdir}:*/:/ s/:*@srcdir@:*/:/ s/^\([^=]*=[ ]*\):*/\1/ s/:*$// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF fi # test -n "$CONFIG_FILES" for ac_tag in :F $CONFIG_FILES do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 echo "$as_me: error: Invalid tag $ac_tag." >&2;} { (exit 1); exit 1; }; };; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 echo "$as_me: error: cannot find input file: $ac_f" >&2;} { (exit 1); exit 1; }; };; esac ac_file_inputs="$ac_file_inputs $ac_f" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input="Generated from "`IFS=: echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} fi case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin";; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` { as_dir="$ac_dir" case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= case `sed -n '/datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p ' $ac_file_inputs` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s&@configure_input@&$configure_input&;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t $ac_datarootdir_hack " $ac_file_inputs | sed -f "$tmp/subs-1.sed" >$tmp/out test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&5 echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&2;} rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out"; rm -f "$tmp/out";; *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; esac ;; esac done # for ac_tag { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } fi lbdb-0.38ubuntu1/dotlock.c0000664000000000000000000002654610330705650012402 0ustar /* * Copyright (C) 1996-2000 Michael R. Elkins * Copyright (C) 1998-2000 Thomas Roessler * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,, USA. */ /* * Completely stolen from the Mutt mailreader */ #include #include #include #include #include #include #include #include #include #include #include #include #ifndef _POSIX_PATH_MAX #include #endif #include "dotlock.h" #include "helpers.h" #ifdef HAVE_GETOPT_H #include #endif #define MAXLINKS 1024 /* maximum link depth */ #define LONG_STRING 1024 #define MAXLOCKATTEMPT 5 static int DotlockFlags; static int Retry = MAXLOCKATTEMPT; static char *Hostname; static int dotlock_deference_symlink (char *, size_t, const char *); static int dotlock_prepare (char *, size_t, const char *, int fd); static int dotlock_check_stats (struct stat *, struct stat *); static int dotlock_dispatch (const char *, int fd); static void usage (const char *); static void dotlock_expand_link (char *, const char *, const char *); /* These functions work on the current directory. * Invoke dotlock_prepare () before and check their * return value. */ static int dotlock_try (void); static int dotlock_unlock (const char *); static int dotlock_unlink (const char *); static int dotlock_lock (const char *); #define check_flags(a) if (a & DL_FL_ACTIONS) usage (argv[0]) int main (int argc, char **argv) { int i; char *p; struct utsname utsname; /* determine the system's host name */ uname (&utsname); if (!(Hostname = safe_strdup (utsname.nodename))) return DL_EX_ERROR; if ((p = strchr (Hostname, '.'))) *p = '\0'; /* parse the command line options. */ DotlockFlags = 0; while ((i = getopt (argc, argv, "dtfur:")) != EOF) { switch (i) { /* actions, mutually exclusive */ case 't': check_flags (DotlockFlags); DotlockFlags |= DL_FL_TRY; break; case 'd': check_flags (DotlockFlags); DotlockFlags |= DL_FL_UNLINK; break; case 'u': check_flags (DotlockFlags); DotlockFlags |= DL_FL_UNLOCK; break; /* other flags */ case 'f': DotlockFlags |= DL_FL_FORCE; break; case 'r': DotlockFlags |= DL_FL_RETRY; Retry = atoi (optarg); break; default: usage (argv[0]); } } if (optind == argc || Retry < 0) usage (argv[0]); return dotlock_dispatch (argv[optind], -1); } static int dotlock_dispatch (const char *f, int fd) { char realpath[_POSIX_PATH_MAX]; /* If dotlock_prepare () succeeds [return value == 0], * realpath contains the basename of f, and we have * successfully changed our working directory to * `dirname $f`. Additionally, f has been opened for * reading to verify that the user has at least read * permissions on that file. * * For a more detailed explanation of all this, see the * lengthy comment below. */ if (dotlock_prepare (realpath, sizeof (realpath), f, fd) != 0) return DL_EX_ERROR; /* Actually perform the locking operation. */ if (DotlockFlags & DL_FL_TRY) return dotlock_try (); else if (DotlockFlags & DL_FL_UNLOCK) return dotlock_unlock (realpath); else if (DotlockFlags & DL_FL_UNLINK) return dotlock_unlink (realpath); else /* lock */ return dotlock_lock (realpath); } /* * Usage information. * * This function doesn't return. * */ static void usage (const char *av0) { fprintf (stderr, "usage: %s [-t|-f|-u|-d] [-r ] file\n", av0); fputs ("\noptions:" "\n -t\t\ttry" "\n -f\t\tforce" "\n -u\t\tunlock" "\n -d\t\tunlink" "\n -r \tRetry locking" "\n", stderr); exit (DL_EX_ERROR); } /* * Access checking: Let's avoid to lock other users' mail * spool files if we aren't permitted to read them. * * Some simple-minded access (2) checking isn't sufficient * here: The problem is that the user may give us a * deeply nested path to a file which has the same name * as the file he wants to lock, but different * permissions, say, e.g. * /tmp/lots/of/subdirs/var/spool/mail/root. * * He may then try to replace /tmp/lots/of/subdirs by a * symbolic link to / after we have invoked access () to * check the file's permissions. The lockfile we'd * create or remove would then actually be * /var/spool/mail/root. * * To avoid this attack, we proceed as follows: * * - First, follow symbolic links a la * dotlock_deference_symlink (). * * - get the result's dirname. * * - chdir to this directory. If you can't, bail out. * * - try to open the file in question, only using its * basename. If you can't, bail out. * * - fstat that file and compare the result to a * subsequent lstat (only using the basename). If * the comparison fails, bail out. * * dotlock_prepare () is invoked from main () directly * after the command line parsing has been done. * * Return values: * * 0 - Evereything's fine. The program's new current * directory is the contains the file to be locked. * The string pointed to by bn contains the name of * the file to be locked. * * -1 - Something failed. Don't continue. * * tlr, Jul 15 1998 */ static int dotlock_check_stats (struct stat *fsb, struct stat *lsb) { /* S_ISLNK (fsb->st_mode) should actually be impossible, * but we may have mixed up the parameters somewhere. * play safe. */ if (S_ISLNK (lsb->st_mode) || S_ISLNK (fsb->st_mode)) return -1; if ((lsb->st_dev != fsb->st_dev) || (lsb->st_ino != fsb->st_ino) || (lsb->st_mode != fsb->st_mode) || (lsb->st_nlink != fsb->st_nlink) || (lsb->st_uid != fsb->st_uid) || (lsb->st_gid != fsb->st_gid) || (lsb->st_rdev != fsb->st_rdev) || (lsb->st_size != fsb->st_size)) { /* something's fishy */ return -1; } return 0; } static int dotlock_prepare (char *bn, size_t l, const char *f, int _fd) { struct stat fsb, lsb; char realpath[_POSIX_PATH_MAX]; char *basename, *dirname; char *p; int fd; int r; if (dotlock_deference_symlink (realpath, sizeof (realpath), f) == -1) return -1; if ((p = strrchr (realpath, '/'))) { *p = '\0'; basename = p + 1; dirname = realpath; } else { basename = realpath; dirname = "."; } if (strlen (basename) + 1 > l) return -1; strfcpy (bn, basename, l); if (chdir (dirname) == -1) return -1; if (_fd != -1) fd = _fd; else if ((fd = open (basename, O_RDONLY)) == -1) return -1; r = fstat (fd, &fsb); if (_fd == -1) close (fd); if (r == -1) return -1; if (lstat (basename, &lsb) == -1) return -1; if (dotlock_check_stats (&fsb, &lsb) == -1) return -1; return 0; } /* * Expand a symbolic link. * * This function expects newpath to have space for * at least _POSIX_PATH_MAX characters. * */ static void dotlock_expand_link (char *newpath, const char *path, const char *link) { const char *lb = NULL; size_t len; /* link is full path */ if (*link == '/') { strfcpy (newpath, link, _POSIX_PATH_MAX); return; } if ((lb = strrchr (path, '/')) == NULL) { /* no path in link */ strfcpy (newpath, link, _POSIX_PATH_MAX); return; } len = lb - path + 1; memcpy (newpath, path, len); strfcpy (newpath + len, link, _POSIX_PATH_MAX - len); } /* * Deference a chain of symbolic links * * The final path is written to d. * */ static int dotlock_deference_symlink (char *d, size_t l, const char *path) { struct stat sb; char realpath[_POSIX_PATH_MAX]; const char *pathptr = path; int count = 0; while (count++ < MAXLINKS) { if (lstat (pathptr, &sb) == -1) { /* perror (pathptr); */ return -1; } if (S_ISLNK (sb.st_mode)) { char linkfile[_POSIX_PATH_MAX]; char linkpath[_POSIX_PATH_MAX]; int len; if ((len = readlink (pathptr, linkfile, sizeof (linkfile))) == -1) { /* perror (pathptr); */ return -1; } linkfile[len] = '\0'; dotlock_expand_link (linkpath, pathptr, linkfile); strfcpy (realpath, linkpath, sizeof (realpath)); pathptr = realpath; } else break; } strfcpy (d, pathptr, l); return 0; } /* * Dotlock a file. * * realpath is assumed _not_ to be an absolute path to * the file we are about to lock. Invoke * dotlock_prepare () before using this function! * */ #define HARDMAXATTEMPTS 10 static int dotlock_lock (const char *realpath) { char lockfile[_POSIX_PATH_MAX + LONG_STRING]; char nfslockfile[_POSIX_PATH_MAX + LONG_STRING]; size_t prev_size = 0; int fd; int count = 0; int hard_count = 0; struct stat sb; time_t t; sprintf (nfslockfile, "%s.%s.%d", realpath, Hostname, (int) getpid ()); sprintf (lockfile, "%s.lock", realpath); unlink (nfslockfile); while ((fd = open (nfslockfile, O_WRONLY | O_EXCL | O_CREAT, 0)) < 0) { if (errno != EAGAIN) { /* perror ("cannot open NFS lock file"); */ return DL_EX_ERROR; } } close (fd); while (hard_count++ < HARDMAXATTEMPTS) { link (nfslockfile, lockfile); if (stat (nfslockfile, &sb) != 0) { /* perror ("stat"); */ return DL_EX_ERROR; } if (sb.st_nlink == 2) break; if (count == 0) prev_size = sb.st_size; if (prev_size == sb.st_size && ++count > Retry) { if (DotlockFlags & DL_FL_FORCE) { unlink (lockfile); count = 0; continue; } else { unlink (nfslockfile); return DL_EX_EXIST; } } prev_size = sb.st_size; /* don't trust sleep (3) as it may be interrupted * by users sending signals. */ t = time (NULL); do { sleep (1); } while (time (NULL) == t); } unlink (nfslockfile); return DL_EX_OK; } /* * Unlock a file. * * The same comment as for dotlock_lock () applies here. * */ static int dotlock_unlock (const char *realpath) { char lockfile[_POSIX_PATH_MAX + LONG_STRING]; int i; sprintf (lockfile, "%s.lock", realpath); i = unlink (lockfile); if (i == -1) return DL_EX_ERROR; return DL_EX_OK; } /* remove an empty file */ static int dotlock_unlink (const char *realpath) { struct stat lsb; int i = -1; if (dotlock_lock (realpath) != DL_EX_OK) return DL_EX_ERROR; if ((i = lstat (realpath, &lsb)) == 0 && lsb.st_size == 0) unlink (realpath); dotlock_unlock (realpath); return (i == 0) ? DL_EX_OK : DL_EX_ERROR; } /* * Check if a file can be locked at all. * * The same comment as for dotlock_lock () applies here. * */ static int dotlock_try (void) { if (access (".", W_OK) == 0) return DL_EX_OK; return DL_EX_IMPOSSIBLE; } lbdb-0.38ubuntu1/helpers.h0000664000000000000000000000314710330705650012402 0ustar /* * Copyright (c) 1998 Thomas Roessler * * This file contains the prototypes for several of the * functions from helpers.c. It is part of the "little * brother database" packet. * * These functions have been stolen from the mutt mail * user agent. The copyright notice from there: * * Copyright (C) 1996-8 Michael R. Elkins * * This program is free software; you can * redistribute it and/or modify it under the terms * of the GNU General Public License as published by * the Free Software Foundation; either version 2 of * the License, or (at your option) any later * version. * * This program is distributed in the hope that it * will be useful, but WITHOUT ANY WARRANTY; without * even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,, USA. */ /* $Id: helpers.h,v 1.4 2005-10-29 14:48:08 roland Exp $ */ #ifndef _HELPERS_H #define _HELPERS_H #include char *safe_strdup (const char *); void *safe_calloc (size_t, size_t); void *safe_malloc (unsigned int); void safe_realloc (void **, size_t); void safe_free (void *); #define FREE(x) safe_free(x) #define SKIPWS(c) while (*(c) && isspace ((unsigned char) *(c))) c++; #define strfcpy(A,B,C) strncpy(A,B,C), *(A+(C)-1)=0 #define STRING 256 #endif lbdb-0.38ubuntu1/INSTALL0000664000000000000000000000117407245225342011624 0ustar Installation notes ------------------ To install the Little Brother's database, type: ./configure make install Note that this will put quite a few auxiliary files into /usr/local/lib. You may want to put lbdb into a separate directory hierarchy such as /usr/local/lbdb (use the --prefix switch), or you may want to give it a different libdir, such as /usr/local/lib/lbdb (use the --libdir switch). You need to have the Palm::PDB and Palm::Address Perl modules installed to use the m_palm module. You need to have the Net::LDAP Perl module installed to use the m_ldap module. $Id: INSTALL,v 1.3 2001-02-22 15:06:10 roland Exp $ lbdb-0.38ubuntu1/rfc822.c0000664000000000000000000003664510330705653011755 0ustar /* * Copyright (C) 1996-8 Michael R. Elkins * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,, USA. */ /* $Id: rfc822.c,v 1.5 2005-10-29 14:48:11 roland Exp $ */ #include #include #include #include #include "helpers.h" #include "rfc822.h" const char RFC822Specials[] = "@.,:;<>[]\\\"()"; #define is_special(x) strchr(RFC822Specials,x) int RFC822Error = 0; /* these must defined in the same order as the numerated errors given in rfc822.h */ const char *RFC822Errors[] = { "out of memory", "mismatched parenthesis", "mismatched quotes", "bad route in <>", "bad address in <>", "bad address spec" }; void rfc822_dequote_comment (char *s) { char *w = s; for (; *s; s++) { if (*s == '\\') { if (!*++s) break; /* error? */ *w++ = *s; } else if (*s != '\"') { if (w != s) *w = *s; w++; } } *w = 0; } void rfc822_free_address (ADDRESS **p) { ADDRESS *t; while (*p) { t = *p; *p = (*p)->next; #ifdef EXACT_ADDRESS FREE (&t->val); #endif FREE (&t->personal); FREE (&t->mailbox); FREE (&t); } } static const char * parse_comment (const char *s, char *comment, size_t *commentlen, size_t commentmax) { int level = 1; while (*s && level) { if (*s == '(') level++; else if (*s == ')') { if (--level == 0) { s++; break; } } else if (*s == '\\') { if (!*++s) break; } if (*commentlen < commentmax) comment[(*commentlen)++] = *s; s++; } if (level) { RFC822Error = ERR_MISMATCH_PAREN; return NULL; } return s; } static const char * parse_quote (const char *s, char *token, size_t *tokenlen, size_t tokenmax) { if (*tokenlen < tokenmax) token[(*tokenlen)++] = '"'; while (*s) { if (*tokenlen < tokenmax) token[(*tokenlen)++] = *s; if (*s == '"') return (s + 1); if (*s == '\\') { if (!*++s) break; } s++; } RFC822Error = ERR_MISMATCH_QUOTE; return NULL; } static const char * next_token (const char *s, char *token, size_t *tokenlen, size_t tokenmax) { if (*s == '(') return (parse_comment (s + 1, token, tokenlen, tokenmax)); if (*s == '"') return (parse_quote (s + 1, token, tokenlen, tokenmax)); if (is_special (*s)) { if (*tokenlen < tokenmax) token[(*tokenlen)++] = *s; return (s + 1); } while (*s) { if (isspace (*s) || is_special (*s)) break; if (*tokenlen < tokenmax) token[(*tokenlen)++] = *s; s++; } return s; } static const char * parse_mailboxdomain (const char *s, const char *nonspecial, char *mailbox, size_t *mailboxlen, size_t mailboxmax, char *comment, size_t *commentlen, size_t commentmax) { const char *ps; while (*s) { SKIPWS (s); if (strchr (nonspecial, *s) == NULL && is_special (*s)) return s; if (*s == '(') { if (*commentlen && *commentlen < commentmax) comment[(*commentlen)++] = ' '; ps = next_token (s, comment, commentlen, commentmax); } else ps = next_token (s, mailbox, mailboxlen, mailboxmax); if (!ps) return NULL; s = ps; } return s; } static const char * parse_address (const char *s, char *token, size_t *tokenlen, size_t tokenmax, char *comment, size_t *commentlen, size_t commentmax, ADDRESS *addr) { s = parse_mailboxdomain (s, ".\"(\\", token, tokenlen, tokenmax, comment, commentlen, commentmax); if (!s) return NULL; if (*s == '@') { if (*tokenlen < tokenmax) token[(*tokenlen)++] = '@'; s = parse_mailboxdomain (s + 1, ".([]\\", token, tokenlen, tokenmax, comment, commentlen, commentmax); if (!s) return NULL; } token[*tokenlen] = 0; addr->mailbox = safe_strdup (token); if (*commentlen && !addr->personal) { comment[*commentlen] = 0; addr->personal = safe_strdup (comment); } return s; } static const char * parse_route_addr (const char *s, char *comment, size_t *commentlen, size_t commentmax, ADDRESS *addr) { char token[STRING]; size_t tokenlen = 0; SKIPWS (s); /* find the end of the route */ if (*s == '@') { while (s && *s == '@') { if (tokenlen < sizeof (token) - 1) token[tokenlen++] = '@'; s = parse_mailboxdomain (s + 1, ".\\[](", token, &tokenlen, sizeof (token) - 1, comment, commentlen, commentmax); } if (!s || *s != ':') { RFC822Error = ERR_BAD_ROUTE; return NULL; /* invalid route */ } if (tokenlen < sizeof (token) - 1) token[tokenlen++] = ':'; s++; } if ((s = parse_address (s, token, &tokenlen, sizeof (token) - 1, comment, commentlen, commentmax, addr)) == NULL) return NULL; if (*s != '>' || !addr->mailbox) { RFC822Error = ERR_BAD_ROUTE_ADDR; return NULL; } s++; return s; } static const char * parse_addr_spec (const char *s, char *comment, size_t *commentlen, size_t commentmax, ADDRESS *addr) { char token[STRING]; size_t tokenlen = 0; s = parse_address (s, token, &tokenlen, sizeof (token) - 1, comment, commentlen, commentmax, addr); if (s && *s && *s != ',' && *s != ';') { RFC822Error = ERR_BAD_ADDR_SPEC; return NULL; } return s; } static void add_addrspec (ADDRESS **top, ADDRESS **last, const char *phrase, char *comment, size_t *commentlen, size_t commentmax) { ADDRESS *cur = rfc822_new_address (); if (parse_addr_spec (phrase, comment, commentlen, commentmax, cur) == NULL) return; if (*last) (*last)->next = cur; else *top = cur; *last = cur; } ADDRESS *rfc822_parse_adrlist (ADDRESS *top, const char *s) { const char *begin, *ps; char comment[STRING], phrase[STRING]; size_t phraselen = 0, commentlen = 0; ADDRESS *cur, *last = NULL; RFC822Error = 0; last = top; while (last && last->next) last = last->next; SKIPWS (s); begin = s; while (*s) { if (*s == ',') { if (phraselen) { phrase[phraselen] = 0; add_addrspec (&top, &last, phrase, comment, &commentlen, sizeof (comment) - 1); } else if (commentlen && last && !last->personal) { comment[commentlen] = 0; last->personal = safe_strdup (comment); } #ifdef EXACT_ADDRESS if (last && !last->val) last->val = mutt_substrdup (begin, s); #endif commentlen = 0; phraselen = 0; s++; begin = s; SKIPWS (begin); } else if (*s == '(') { if (commentlen && commentlen < sizeof (comment) - 1) comment[commentlen++] = ' '; if ((ps = next_token (s, comment, &commentlen, sizeof (comment) - 1)) == NULL) { rfc822_free_address (&top); return NULL; } s = ps; } else if (*s == ':') { cur = rfc822_new_address (); phrase[phraselen] = 0; cur->mailbox = safe_strdup (phrase); cur->group = 1; if (last) last->next = cur; else top = cur; last = cur; #ifdef EXACT_ADDRESS last->val = mutt_substrdup (begin, s); #endif phraselen = 0; commentlen = 0; s++; begin = s; SKIPWS (begin); } else if (*s == ';') { if (phraselen) { phrase[phraselen] = 0; add_addrspec (&top, &last, phrase, comment, &commentlen, sizeof (comment) - 1); } else if (commentlen && !last->personal) { comment[commentlen] = 0; last->personal = safe_strdup (comment); } #ifdef EXACT_ADDRESS if (last && !last->val) last->val = mutt_substrdup (begin, s); #endif /* add group terminator */ cur = rfc822_new_address (); if (last) { last->next = cur; last = cur; } phraselen = 0; commentlen = 0; s++; begin = s; SKIPWS (begin); } else if (*s == '<') { phrase[phraselen] = 0; cur = rfc822_new_address (); if (phraselen) { if (cur->personal) FREE (&cur->personal); /* if we get something like "Michael R. Elkins" remove the quotes */ rfc822_dequote_comment (phrase); cur->personal = safe_strdup (phrase); } if ((ps = parse_route_addr (s + 1, comment, &commentlen, sizeof (comment) - 1, cur)) == NULL) { rfc822_free_address (&top); rfc822_free_address (&cur); return NULL; } if (last) last->next = cur; else top = cur; last = cur; phraselen = 0; commentlen = 0; s = ps; } else { if (phraselen && phraselen < sizeof (phrase) - 1) phrase[phraselen++] = ' '; if ((ps = next_token (s, phrase, &phraselen, sizeof (phrase) - 1)) == NULL) { rfc822_free_address (&top); return NULL; } s = ps; } SKIPWS (s); } if (phraselen) { phrase[phraselen] = 0; comment[commentlen] = 0; add_addrspec (&top, &last, phrase, comment, &commentlen, sizeof (comment) - 1); } else if (commentlen && last && !last->personal) { comment[commentlen] = 0; last->personal = safe_strdup (comment); } #ifdef EXACT_ADDRESS if (last) last->val = mutt_substrdup (begin, s); #endif return top; } void rfc822_qualify (ADDRESS *addr, const char *host) { char *p; for (; addr; addr = addr->next) if (!addr->group && addr->mailbox && strchr (addr->mailbox, '@') == NULL) { p = safe_malloc (strlen (addr->mailbox) + strlen (host) + 2); sprintf (p, "%s@%s", addr->mailbox, host); safe_free (&addr->mailbox); addr->mailbox = p; } } void rfc822_cat (char *buf, size_t buflen, const char *value, const char *specials) { if (strpbrk (value, specials)) { char tmp[256], *pc = tmp; size_t tmplen = sizeof (tmp) - 3; *pc++ = '"'; for (; *value && tmplen > 1; value++) { if (*value == '\\' || *value == '"') { *pc++ = '\\'; tmplen--; } *pc++ = *value; tmplen--; } *pc++ = '"'; *pc = 0; strfcpy (buf, tmp, buflen); } else strfcpy (buf, value, buflen); } void rfc822_write_address_single (char *buf, size_t buflen, ADDRESS *addr) { size_t len; char *pbuf = buf; char *pc; if (!addr) return; buflen--; /* save room for the terminal nul */ #ifdef EXACT_ADDRESS if (addr->val) { if (!buflen) goto done; strfcpy (pbuf, addr->val, buflen); len = strlen (pbuf); pbuf += len; buflen -= len; if (addr->group) { if (!buflen) goto done; *pbuf++ = ':'; buflen--; *pbuf = 0; } return; } #endif if (addr->personal) { if (strpbrk (addr->personal, RFC822Specials)) { if (!buflen) goto done; *pbuf++ = '"'; buflen--; for (pc = addr->personal; *pc && buflen > 0; pc++) { if (*pc == '"' || *pc == '\\') { if (!buflen) goto done; *pbuf++ = '\\'; buflen--; } if (!buflen) goto done; *pbuf++ = *pc; buflen--; } if (!buflen) goto done; *pbuf++ = '"'; buflen--; } else { if (!buflen) goto done; strfcpy (pbuf, addr->personal, buflen); len = strlen (pbuf); pbuf += len; buflen -= len; } if (!buflen) goto done; *pbuf++ = ' '; buflen--; } if (addr->personal || (addr->mailbox && *addr->mailbox == '@')) { if (!buflen) goto done; *pbuf++ = '<'; buflen--; } if (addr->mailbox) { if (!buflen) goto done; strfcpy (pbuf, addr->mailbox, buflen); len = strlen (pbuf); pbuf += len; buflen -= len; if (addr->personal || (addr->mailbox && *addr->mailbox == '@')) { if (!buflen) goto done; *pbuf++ = '>'; buflen--; } if (addr->group) { if (!buflen) goto done; *pbuf++ = ':'; buflen--; if (!buflen) goto done; *pbuf++ = ' '; buflen--; } } else { if (!buflen) goto done; *pbuf++ = ';'; buflen--; } done: /* no need to check for length here since we already save space at the beginning of this routine */ *pbuf = 0; } /* note: it is assumed that `buf' is nul terminated! */ void rfc822_write_address (char *buf, size_t buflen, ADDRESS *addr) { char *pbuf = buf; size_t len = strlen (buf); buflen--; /* save room for the terminal nul */ if (len > 0) { if (len > buflen) return; /* safety check for bogus arguments */ pbuf += len; buflen -= len; if (!buflen) goto done; *pbuf++ = ','; buflen--; if (!buflen) goto done; *pbuf++ = ' '; buflen--; } for (; addr && buflen > 0; addr = addr->next) { /* use buflen+1 here because we already saved space for the trailing nul char, and the subroutine can make use of it */ rfc822_write_address_single (pbuf, buflen + 1, addr); /* this should be safe since we always have at least 1 char passed into the above call, which means `pbuf' should always be nul terminated */ len = strlen (pbuf); pbuf += len; buflen -= len; /* if there is another address, and its not a group mailbox name or group terminator, add a comma to separate the addresses */ if (addr->next && addr->next->mailbox && !addr->group) { if (!buflen) goto done; *pbuf++ = ','; buflen--; if (!buflen) goto done; *pbuf++ = ' '; buflen--; } } done: *pbuf = 0; } /* this should be rfc822_cpy_adr */ ADDRESS *rfc822_cpy_adr_real (ADDRESS *addr) { ADDRESS *p = rfc822_new_address (); #ifdef EXACT_ADDRESS p->val = safe_strdup (addr->val); #endif p->personal = safe_strdup (addr->personal); p->mailbox = safe_strdup (addr->mailbox); p->group = addr->group; return p; } /* this should be rfc822_cpy_adrlist */ ADDRESS *rfc822_cpy_adr (ADDRESS *addr) { ADDRESS *top = NULL, *last = NULL; for (; addr; addr = addr->next) { if (last) { last->next = rfc822_cpy_adr_real (addr); last = last->next; } else top = last = rfc822_cpy_adr_real (addr); } return top; } /* append list 'b' to list 'a' and return the last element in the new list */ ADDRESS *rfc822_append (ADDRESS **a, ADDRESS *b) { ADDRESS *tmp = *a; while (tmp && tmp->next) tmp = tmp->next; if (!b) return tmp; if (tmp) tmp->next = rfc822_cpy_adr (b); else tmp = *a = rfc822_cpy_adr (b); while (tmp && tmp->next) tmp = tmp->next; return tmp; } #ifdef TESTING void safe_free (void *ptr) { void **p = (void **)ptr; if (*p) { free (*p); *p = 0; } } int main (int argc, char **argv) { ADDRESS *list; char buf[256]; char *str = "michael, Michael Elkins , testing a really complex address: this example <@contains.a.source.route@with.multiple.hosts:address@example.com>;, lothar@of.the.hillpeople (lothar)"; list = rfc822_parse_adrlist (NULL, str); buf[0] = 0; rfc822_write_address (buf, sizeof (buf), list); rfc822_free_address (&list); puts (buf); exit (0); } #endif lbdb-0.38ubuntu1/rfc822.h0000664000000000000000000000376510330705653011757 0ustar /* * Copyright (C) 1996-8 Michael R. Elkins * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,, USA. */ /* $Id: rfc822.h,v 1.3 2005-10-29 14:48:11 roland Exp $ */ #ifndef rfc822_h #define rfc822_h /* possible values for RFC822Error */ enum { ERR_MEMORY = 1, ERR_MISMATCH_PAREN, ERR_MISMATCH_QUOTE, ERR_BAD_ROUTE, ERR_BAD_ROUTE_ADDR, ERR_BAD_ADDR_SPEC }; typedef struct address_t { #ifdef EXACT_ADDRESS char *val; /* value of address as parsed */ #endif char *personal; /* real name of address */ char *mailbox; /* mailbox and host address */ int group; /* group mailbox? */ struct address_t *next; } ADDRESS; void rfc822_free_address (ADDRESS **); void rfc822_qualify (ADDRESS *, const char *); ADDRESS *rfc822_parse_adrlist (ADDRESS *, const char *s); ADDRESS *rfc822_cpy_adr (ADDRESS *addr); ADDRESS *rfc822_cpy_adr_real (ADDRESS *addr); ADDRESS *rfc822_append (ADDRESS **a, ADDRESS *b); void rfc822_write_address (char *, size_t, ADDRESS *); void rfc822_write_list (char *, size_t, ADDRESS *); void rfc822_free_address (ADDRESS **addr); void rfc822_cat (char *, size_t, const char *, const char *); extern int RFC822Error; extern const char *RFC822Errors[]; #define rfc822_error(x) RFC822Errors[x] #define rfc822_new_address() calloc(1,sizeof(ADDRESS)) #endif /* rfc822_h */ lbdb-0.38ubuntu1/dotlock.man0000664000000000000000000000733110330705650012722 0ustar .\" -*-nroff-*- .\" .\" .\" Copyright (C) 1996-8 Michael R. Elkins .\" Copyright (C) 1998-9 Thomas Roessler .\" Copyright (C) 2005 Roland Rosenfeld .\" .\" This program is free software; you can redistribute it and/or modify .\" it under the terms of the GNU General Public License as published by .\" the Free Software Foundation; either version 2 of the License, or .\" (at your option) any later version. .\" .\" This program is distributed in the hope that it will be useful, .\" but WITHOUT ANY WARRANTY; without even the implied warranty of .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the .\" GNU General Public License for more details. .\" .\" You should have received a copy of the GNU General Public License .\" along with this program; if not, write to the Free Software Foundation, .\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,, USA. .\" .TH dotlock 1 "OCTOBER 2005" Unix "User Manuals" .SH NAME .PP lbdb_dotlock \- Lock mail spool files. .SH SYNOPSIS .PP .B lbdb_dotlock [\-t|\-f|\-u|\-d] [\-r \fIretries\fP] \fIfile\fP .SH DESCRIPTION .PP .B dotlock implements the traditional mail spool file locking method: To lock \fIfile\fP, a file named \fIfile\fP.lock is created. .SH OPTIONS .PP .IP "\-t" Just try. .B dotlock won't actually lock a file, but inform the invoking process if it's at all possible to lock \fIfile\fP. .IP "\-f" Force the lock. If another process holds a lock on \fIfile\fP longer than a certain amount of time, .B dotlock will break that lock by removing the lockfile. .IP "\-u" Unlock. .B dotlock will remove \fIfile\fP.lock. .IP "\-d" Delete. .B dotlock will lock \fIfile\fP, remove it if it has length 0, and afterwards remove \fIfile\fP.lock. .IP "\-r \fIretries\fP" This command line option tells .B dotlock to try locking \fIretries\fP times before giving up or (if invoked with the .B \-f command line option) break a lock. The default value is 5. .B dotlock waits one second between successive locking attempts. .SH FILES .PP .IP "\fIfile\fP.lock" The lock file .B dotlock generates. .SH SEE ALSO .PP .BR fcntl (2), .BR flock (2), .BR lockfile (1), .BR lbdb-fetchaddr (1) .SH DIAGNOSTICS .PP .B dotlock gives all diagnostics in its return values: .TP .B "0 \- DL_EX_OK" The program was successful. .TP .B "1 \- DL_EX_ERROR" An unspecified error such as bad command line parameters, lack of system memory and the like has occured. .TP .B "3 \- DL_EX_EXIST" The user wants to lock a file which has been locked by another process already. If .B dotlock is invoked with the .B \-f command line option, .B dotlock won't generate this error, but break other processes' locks. .TP .B "4 \- DL_EX_NEED_RPIVS" This return value only occurs if .B dotlock has been invoked with the .B \-t command line option. It means that .B dotlock will have to use its group mail privileges to lock \fIfile\fP. .TP .B "5 \- DL_EX_IMPOSSIBLE" This return value only occurs if .B dotlock has been invoked with the .B \-t command line option. It means that .B dotlock is unable to lock \fIfile\fP. .SH NOTES .PP .B dotlock tries to implement an NFS-safe dotlocking method which was borrowed from .BR lockfile (1). .PP If the user can't open \fIfile\fP for reading with his normal privileges, dotlock will return the .B DL_EX_ERROR exit value to avoid certain attacks against other users' spool files. The code carefully avoids race conditions when checking permissions; for details of all this see the comments in dotlock.c. .SH HISTORY .PP .B dotlock is part of the Mutt mail user agent package. It has been created to avoid running mutt with group mail privileges. .SH AUTHOR Thomas Roessler lbdb-0.38ubuntu1/m_muttalias.sh.in0000664000000000000000000000344111214161326014042 0ustar #! @SH@ # # -*-sh-*- # # Copyright (C) 2000 Brian Salter-Duke # 2000-2007 Roland Rosenfeld # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software Foundation, # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,, USA. # # $Id: m_muttalias.sh.in,v 1.11 2009-06-11 10:56:22 roland Exp $ m_muttalias_query() { [ -d ${MUTT_DIRECTORY:=$HOME/.mutt} ] || MUTT_DIRECTORY=$HOME for file in ${MUTTALIAS_FILES:-.muttrc .mail_aliases muttrc aliases} ; do if [ $file = ${file#/} ] then file=$MUTT_DIRECTORY/$file fi if [ -f "$file" ] then grep -ia "$@" $file \ | grep -a '^alias[ ][ ]*[^,][^,]*[ ][ ]*\([^,]\|\\\".*\\\"\)*$' \ | sed -e 's/^alias[ ][ ]*\([^ ][^ ]*\)[ ][ ]*<\([^ >][^ >]*\)>[ ][ ]*(\([^<>()]*\))[^()<>]*$/\2 \3 alias \1/' \ -e 's/^alias[ ][ ]*\([^ ][^ ]*\)[ ][ ]*\(\\\".*\\\"[^<>()]*\|[^<>()]*\)<\([^<>()]*\)>[^<>]*$/\3 \2 alias \1/' \ -e 's/^alias[ ][ ]*\([^ ][^ ]*\)[ ][ ]*\([^<>()]*\)(\(\\\".*\\\"[^<>()]*\|[^<>()]*\))[^()<>]*$/\2 \3 alias \1/' \ -e 's/\\\"//g' \ | grep -va '^alias[ ][ ]*[^,][^,]*[ ][ ]*[^,]*$' || : fi done } lbdb-0.38ubuntu1/rfc2047.h0000664000000000000000000000214510711134740012023 0ustar /* * Copyright (C) 1996-8 Michael R. Elkins * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,, USA. */ /* $Id: rfc2047.h,v 1.4 2007-10-28 16:33:36 roland Exp $ */ extern const char *Charset; void rfc2047_encode_string (char *, size_t, const unsigned char *); void rfc2047_encode_adrlist (ADDRESS *); void rfc2047_decode (char *, const char *, size_t); void rfc2047_decode_adrlist (ADDRESS *); lbdb-0.38ubuntu1/m_ldap.sh.in0000775000000000000000000000231511214161326012761 0ustar #! @SH@ # # -*-sh-*- # # m_ldap - ldap module for lbdb # Copyright (C) 2001 Marc de Courville # # $Id: m_ldap.sh.in,v 1.6 2009-06-11 10:56:22 roland Exp $ # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software Foundation, # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,, USA. prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ m_ldap_query () { if [ "$LDAP_NICKS" != "" ] then for NICK in $LDAP_NICKS do $libdir/mutt_ldap_query --lbdb_output --nickname=$NICK "$@" || : done else $libdir/mutt_ldap_query --lbdb_output "$@" || : fi } lbdb-0.38ubuntu1/configure.in0000664000000000000000000001327211601361220013071 0ustar dnl Copyright (c) 1998-2011 Roland Rosenfeld dnl dnl This program is free software; you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation; either version 2 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program; if not, write to the Free Software Foundation, dnl Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. dnl dnl $Id: configure.in,v 1.48 2011-06-25 13:28:48 roland Exp $ AC_INIT(fetchaddr.c) AC_MSG_CHECKING(for prefix) if test x$prefix = xNONE; then lbdb_cv_prefix=$ac_default_prefix else lbdb_cv_prefix=$prefix fi AC_MSG_RESULT($lbdb_cv_prefix) AC_PROG_CC AC_PROG_INSTALL AC_CHECK_HEADER(getopt.h, AC_DEFINE(HAVE_GETOPT_H)) AM_ICONV dnl SH=NONE dnl If we are runnin bash right now, BASH is set. unset BASH if test "x$SH" = x ; then AC_PATH_PROG(BASH, bash, NONE) if test ! "x$BASH" = xNONE ; then if $BASH -posix -c true ; then SH="$BASH -posix" elif $BASH --posix -c true ; then SH="$BASH --posix" fi echo "Using $SH". fi fi if test "x$SH" = x ; then AC_PATH_PROG(KSH, ksh, NONE) if test ! "x$KSH" = xNONE ; then SH="$KSH" echo "Using $SH". fi fi if test "x$SH" = x ; then AC_PATH_PROG(BINSH, sh, NONE) if test "x$BINSH" = xNONE; then echo "ERROR: Can't find sh." >&2 exit 1 else SH="$BINSH" fi fi AC_SUBST(SH) AC_PATH_PROG(AWK, awk, NONE) AC_PATH_PROG(MAWK, mawk, NONE) AC_PATH_PROG(GAWK, gawk, NONE) AC_PATH_PROG(NAWK, nawk, NONE) if test "x$AWK" != "xNONE" ; then AWK="$AWK" fi if test "x$NAWK" != "xNONE" ; then AWK="$NAWK" fi if test "x$GAWK" != "xNONE" ; then AWK="$GAWK" fi if test "x$MAWK" != "xNONE" ; then AWK="$MAWK" fi AC_SUBST(AWK) AC_PATH_PROG(TAC, tac, NONE) if test "x$TAC" = "xNONE"; then TACTARGET="tac" AC_SUBST(TACTARGET) TACAWK="tac.awk" TAC="$libdir/tac" fi AC_SUBST(TAC) AC_ARG_ENABLE(lbdb_dotlock, AS_HELP_STRING ([--enable-lbdb-dotlock], [Force use of lbdb_dotlock program]), [lbdb_cv_lbdb_dotlock="$enableval"]) AC_PATH_PROG(DOTLOCK_OLD, mutt.dotlock, no) if test x$ac_cv_path_DOTLOCK_OLD = xno ; then AC_PATH_PROG(DOTLOCK, mutt_dotlock, no) else ac_cv_path_DOTLOCK=$ac_cv_path_DOTLOCK_OLD fi if test x$ac_cv_path_DOTLOCK = xno || test x$lbdb_cv_lbdb_dotlock = xyes then DOTLOCK_TARGET="lbdb_dotlock" AC_SUBST(DOTLOCK_TARGET) DOTLOCK="$bindir"/lbdb_dotlock fi AC_SUBST(DOTLOCK) DOTLOCKBASE=`basename $DOTLOCK` AC_SUBST(DOTLOCKBASE) path_fetchaddr="$libdir/fetchaddr" AC_SUBST(path_fetchaddr) # # LBDB_ARG_WITH(FOO, foo, m_foo, [with foo support]) # # several cases: # --with-foo - search for foo in PATH. error if not found # --with-foo=/foo - use /foo # --without-foo - completely disable this # none of the above - search for foo in PATH. disable if not found # AC_DEFUN([LBDB_ARG_WITH], [ withval="" AC_ARG_WITH($2,[AS_HELP_STRING([--with-$2],[$4])]) if test x$withval = xyes; then AC_PATH_PROG($1, $2, "no") if test x$$1 = xno; then AC_MSG_ERROR([$2 not in PATH]) else MODULES="$MODULES $3" AC_SUBST($1) fi elif test x$withval = x; then AC_PATH_PROG($1, $2, "no") if test x$$1 != xno; then MODULES="$MODULES $3" AC_SUBST($1) fi elif test x$withval != xno; then $1=$withval MODULES="$MODULES $3" AC_SUBST($1) fi ]) MODULES="m_inmail m_passwd m_muttalias m_pine m_gnomecard m_bbdb m_wanderlust" LBDB_ARG_WITH(FINGER, finger, m_finger, [with finger support]) LBDB_ARG_WITH(ABOOK, abook, m_abook, [with abook support]) LBDB_ARG_WITH(ADDR_EMAIL, addr-email, m_addr_email, [with addressbook support]) LBDB_ARG_WITH(YPCAT, ypcat, m_yppasswd, [with ypcat passwd support]) LBDB_ARG_WITH(NISCAT, niscat, m_nispasswd, [with niscat passwd support]) LBDB_ARG_WITH(GETENT, getent, m_getent, [with getent passwd support]) LBDB_ARG_WITH(GPG, gpg, m_gpg, [with GnuPG support]) LBDB_ARG_WITH(PGPK, pgpk, m_pgp5, [with PGP 5.* support]) LBDB_ARG_WITH(PGP, pgp, m_pgp2, [with PGP 2.* support]) LBDB_ARG_WITH(EVOLUTION_ADDRESSBOOK_EXPORT, evolution-addressbook-export, m_evolution, [with Evolution support ('auto' searchs at runtime)]) AC_PATH_PROG(PERL, perl, "no") if test "x$PERL" != xno ; then # m_fido needs nodelist2lbdb, which needs perl # m_palm needs palm_lsaddr, which needs perl # m_ldap needs mutt_ldap_query which is written in perl MODULES="$MODULES m_fido m_palm m_ldap" AC_SUBST(PERL) fi # m_osx_addressbook requires xcode (10.3) or projectbuilder (<10.3) AC_PATH_PROG(XCODEBUILD, xcodebuild, "no") if test "x$XCODEBUILD" != xno; then MODULES="$MODULES m_osx_addressbook" AC_SUBST(XCODEBUILD) else AC_PATH_PROG(PBXBUILD, pbxbuild, "no") if test "x$PBXBUILD" != xno ; then MODULES="$MODULES m_osx_addressbook" AC_SUBST(PBXBUILD) fi fi VFORMAT="no" AC_CHECK_HEADER([vf_iface.h], [ AC_CHECK_LIB([vformat], [vf_read_file], [ MODULES="$MODULES m_vcf" VFORMAT="yes" ]) ]) AC_SUBST(VFORMAT) MODULES_SH="" for i in $MODULES ; do MODULES_SH="$MODULES_SH $i.sh" done LBDB_VERSION=`sed -e '2,10000d;s/^.*(\(.*\)).*$/\1/' < debian/changelog` AC_SUBST(LBDB_VERSION) AC_SUBST(MODULES) AC_OUTPUT(Makefile lbdbq.sh munge.awk munge-keeporder.awk lbdb-fetchaddr.sh \ lbdb-munge.sh lbdb_lib.sh nodelist2lbdb.pl palm_lsaddr.pl \ mutt_ldap_query.pl $MODULES_SH $TACAWK lbdb.spec lbdb.rc) lbdb-0.38ubuntu1/palm_lsaddr.pl.in0000664000000000000000000000431110330705653014010 0ustar #! @PERL@ # # palm_lsaddr - Palm address database helper utility for lbdb # Copyright (C) 2000 Dave Pearson # (C) 2003 Nikolaus Rath # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software Foundation, # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,, USA. use Palm::PDB; use Palm::Address; if ( $#ARGV > -1 ) { my $pdb = new Palm::PDB; if ( $pdb ) { $pdb->Load( $ARGV[ 0 ] ); my $record; for ( $i = 0, $record = $pdb->{records}[ $i ]; $record; $i++, $record = $pdb->{records}[ $i ] ) { my $name = $record->{fields}{firstName} . " " . $record->{fields}{name}; # Remove leading and trailing whitespace. $name =~ s/\s+$//; $name =~ s/^\s+//; # If the name is empty, use the company name instead. $name = $record->{fields}{company} unless ( length( $name ) > 0 ); if ( length( $name ) > 0 ) { my $entry; # Find fields containing e-mail addresses for($entry=1; $entry <= 5; $entry++) { # 0 = Work, 1 = Home, 2 = Fax, 3 = Other, 4 = email, # 5 = Main, 6 = Pager, 7 = Mobile if($record->{phoneLabel}{"phone${entry}"} == 4) { # A field can also contain multiple lines. print map "$_\t$name\t(Palm)\n", split(/\n/, $record->{fields}{"phone${entry}"}); } } } } } } lbdb-0.38ubuntu1/lbdb.spec.in0000664000000000000000000000430107233337106012751 0ustar %define ver @LBDB_VERSION@ %define rel 2 %define prefix /usr Summary: The Little Brother's Database Name: lbdb Version: %ver Release: %rel Copyright: GNU General Public Licence URL: http://www.spinnaker.de/lbdb/ Packager: Horms Vendor: Horms Group: Applications/Databases Source: http://www.spinnaker.de/debian/lbdb_%{ver}.tar.gz NoSource: 0 BuildRoot: /var/tmp/lbdb-%{PACKAGE_VERSION}-root Docdir: %{prefix}/doc %description This package was inspired by the Big Brother Database package available for various Emacs mailers, and by Brandon Long's "external query" patch for the Mutt mail user agent. (Note that this patch has been incorporated into the main-line mutt versions as of mutt 0.93.) The package doesn't use any formal database libraries or languages, although it should be quite easy to extend it to use, e.g., an installed PostgreSQL server as it's back end. %prep %setup -q %build %configure 2>&1 | tee -a Configurings-`date +%Y.%m.%d` #Funky NPROC code to speed things up courtesy of Red Hat's kernel rpm if [ -x /usr/bin/getconf ] ; then NRPROC=$(/usr/bin/getconf _NPROCESSORS_ONLN) if [ $NRPROC -eq 0 ] ; then NRPROC=1 fi else NRPROC=1 fi NRPROC=`expr $NRPROC + $NRPROC` make -j $NRPROC 2>&1 | tee -a Makings-`date +%Y.%m.%d` %install rm -rf $RPM_BUILD_ROOT mkdir -p ${RPM_BUILD_ROOT}/%{prefix}/etc make install_prefix=${RPM_BUILD_ROOT} install 2>&1 \ | tee -a Makings-Install-`date +%Y.%m.%d` %clean rm -rf ${RPM_BUILD_DIR}/lbdb-%{ver} rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,root) %doc README COPYING # Keep copies of the configure, build, install reports in the # documentation of the package. %doc Makings-Install-`date +%Y.%m.%d` %doc Makings-`date +%Y.%m.%d` %doc Configurings-`date +%Y.%m.%d` %{prefix} %changelog * Sat Dec 30 2000 Rob Payne - Changed to fit version 0.22 - Change installation process to include RPM_BUILD_ROOT - Removed auto-generated files list that did not take into account RPM 4's automatic compression of the man pages *after* the auto-generation was running. - Removed the empty post, postun, preun scripts. * Mon Apr 10 2000 Horms - created for version 0.18.5 lbdb-0.38ubuntu1/config.guess0000775000000000000000000012706110711135237013112 0ustar #! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, # Inc. timestamp='2007-07-22' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Per Bothner . # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # The plan is that this can be called by configure scripts if you # don't specify an explicit build system type. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep __ELF__ >/dev/null then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm:riscos:*:*|arm:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[45]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep __LP64__ >/dev/null then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) case ${UNAME_MACHINE} in pc98) echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:[3456]*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; EM64T | authenticamd) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; arm*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; cris:Linux:*:*) echo cris-axis-linux-gnu exit ;; crisv32:Linux:*:*) echo crisv32-axis-linux-gnu exit ;; frv:Linux:*:*) echo frv-unknown-linux-gnu exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; mips:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips #undef mipsel #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mipsel #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips #else CPU= #endif #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^CPU/{ s: ::g p }'`" test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips64 #undef mips64el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mips64el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips64 #else CPU= #endif #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^CPU/{ s: ::g p }'`" test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) echo or32-unknown-linux-gnu exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-gnu ;; PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-gnu exit ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit ;; xtensa:Linux:*:*) echo xtensa-unknown-linux-gnu exit ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent # problems with other programs or directories called `ld' in the path. # Set LC_ALL=C to ensure ld outputs messages in English. ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ | sed -ne '/supported targets:/!d s/[ ][ ]*/ /g s/.*supported targets: *// s/ .*// p'` case "$ld_supported_targets" in elf32-i386) TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" ;; a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" exit ;; coff-i386) echo "${UNAME_MACHINE}-pc-linux-gnucoff" exit ;; "") # Either a pre-BFD a.out linker (linux-gnuoldld) or # one that does not give us useful --help. echo "${UNAME_MACHINE}-pc-linux-gnuoldld" exit ;; esac # Determine whether the default compiler is a.out or elf eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include #ifdef __ELF__ # ifdef __GLIBC__ # if __GLIBC__ >= 2 LIBC=gnu # else LIBC=gnulibc1 # endif # else LIBC=gnulibc1 # endif #else #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) LIBC=gnu #else LIBC=gnuaout #endif #endif #ifdef __dietlibc__ LIBC=dietlibc #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^LIBC/{ s: ::g p }'`" test x"${LIBC}" != x && { echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit } test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i386. echo i386-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NSE-?:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 eval $set_cc_for_build cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix\n"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; c34*) echo c34-convex-bsd exit ;; c38*) echo c38-convex-bsd exit ;; c4*) echo c4-convex-bsd exit ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: lbdb-0.38ubuntu1/fetchaddr.c0000664000000000000000000001236410711134737012665 0ustar /* * Copyright (C) 1998-2000 Thomas Roessler * Copyright (C) 2000 Roland Rosenfeld * * This program is free software; you can redistribute * it and/or modify it under the terms of the GNU * General Public License as published by the Free * Software Foundation; either version 2 of the License, * or (at your option) any later version. * * This program is distributed in the hope that it will * be useful, but WITHOUT ANY WARRANTY; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A * PARTICULAR PURPOSE. See the GNU General Public * License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,, USA. * */ /* $Id: fetchaddr.c,v 1.23 2007-10-28 16:33:35 roland Exp $ */ #include #include #include #include #include "helpers.h" #include "rfc822.h" #include "rfc2047.h" #define MAXHDRS 21 struct header { char *tag; char *value; size_t len; size_t taglen; }; struct header hdr[MAXHDRS] = { { "to:", NULL, 0, 3 }, { "from:", NULL, 0, 5 }, { "cc:", NULL, 0, 3 }, { "resent-from:", NULL, 0, 12 }, { "resent-to:", NULL, 0, 10 }, { NULL, NULL, 0, 0 } }; void chop(struct header *cur) { if(cur->len && cur->value[cur->len - 1] == '\n') cur->value[--cur->len] = '\0'; } int writeout(struct header *h, const char *datefmt, unsigned char create_real_name) { int rv = 0; ADDRESS *addr, *p; time_t timep; char timebuf[256]; char *c; if(!h->value) return 0; addr = rfc822_parse_adrlist(NULL, h->value); time(&timep); rfc2047_decode_adrlist(addr); for(p = addr; p; p = p->next) { if(create_real_name == 1 && (!p->personal || !*p->personal) && p->mailbox) { if(p->personal) FREE(p->personal); p->personal = safe_strdup(p->mailbox); c=strchr(p->personal, '@'); if (c) *c='\0'; } if(!p->group && p->mailbox && *p->mailbox && p->personal) { if(p->personal && strlen(p->personal) > 30) strcpy(p->personal + 27, "..."); if ((c=strchr(p->mailbox,'@'))) for(c++; *c; c++) *c=tolower(*c); strftime(timebuf, sizeof(timebuf), datefmt, localtime(&timep)); printf("%s\t%s\t%s\n", p->mailbox, p->personal && *p->personal ? p->personal : "no realname given", timebuf); rv = 1; } } rfc822_free_address(&addr); return rv; } int main(int argc, char* argv[]) { char buff[2048]; char *t; int i, rv; int partial = 0; struct header *cur_hdr = NULL; char *datefmt = NULL; char *headerlist = NULL; char *fieldname, *next; char create_real_name = 0; #ifdef HAVE_ICONV const char **charsetptr = &Charset; #endif /* process command line arguments: */ if (argc > 1) { i = 1; while (i < argc) { if (!strcmp (argv[i], "-d") && i+1 < argc) { datefmt = argv[++i]; } else if (!strcmp (argv[i], "-x") && i+1 < argc) { headerlist = argv[++i]; #ifdef HAVE_ICONV } else if (!strcmp (argv[i], "-c") && i+1 < argc) { *charsetptr = argv[++i]; #endif } else if (!strcmp (argv[i], "-a")) { create_real_name = 1; } else { fprintf (stderr, "%s: `%s' wrong parameter\n", argv[0], argv[i]); } i++; } } if (!datefmt) datefmt = safe_strdup("%Y-%m-%d %H:%M"); if (headerlist && strlen (headerlist) > 0 ) { fieldname = headerlist; i = 0; while ( i < MAXHDRS-1 && (next = strchr (fieldname, ':'))) { hdr[i].tag = safe_malloc (next - fieldname + 2); strncpy (hdr[i].tag, fieldname, next - fieldname); hdr[i].tag[next - fieldname] = ':'; hdr[i].tag[next - fieldname + 1] = '\0'; hdr[i].taglen = next - fieldname + 1; fieldname = next+1; i++; } if (i < MAXHDRS-1 && *fieldname != '\0') { hdr[i].tag = safe_malloc (strlen (fieldname) + 2); strncpy (hdr[i].tag, fieldname, strlen (fieldname)); hdr[i].tag[strlen (fieldname)] = ':'; hdr[i].tag[strlen (fieldname) + 1] = '\0'; hdr[i].taglen = strlen (fieldname) + 1; i++; } hdr[i].tag = NULL; /* end of hdr list */ } while(fgets(buff, sizeof(buff), stdin)) { if(!partial && *buff == '\n') break; if(cur_hdr && (partial || *buff == ' ' || *buff == '\t')) { size_t nl = cur_hdr->len + strlen(buff); safe_realloc((void **) &cur_hdr->value, nl + 1); strcpy(cur_hdr->value + cur_hdr->len, buff); cur_hdr->len = nl; chop(cur_hdr); } else if(!partial && *buff != ' ' && *buff != '\t') { cur_hdr = NULL; for(i = 0; hdr[i].tag; i++) { if(!strncasecmp(buff, hdr[i].tag, hdr[i].taglen)) { cur_hdr = &hdr[i]; break; } } if(cur_hdr) { safe_free(&cur_hdr->value); cur_hdr->value = safe_strdup(buff + cur_hdr->taglen); cur_hdr->len = strlen(cur_hdr->value); chop(cur_hdr); } } if(!(t = strchr(buff, '\n'))) partial = 1; else partial = 0; } for(rv = 0, i = 0; hdr[i].tag; i++) { if(hdr[i].value) rv = writeout(&hdr[i], datefmt, create_real_name) || rv; } return (rv ? 0 : 1); } lbdb-0.38ubuntu1/rfc2047.c0000664000000000000000000001337310711134740012023 0ustar /* * Copyright (C) 1996-8 Michael R. Elkins * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,, USA. */ /* $Id: rfc2047.c,v 1.5 2007-10-28 16:33:36 roland Exp $ */ #include #include #ifdef HAVE_ICONV #include #include #include #endif #include "rfc822.h" #include "rfc2047.h" #include "helpers.h" enum { ENCOTHER, ENC7BIT, ENC8BIT, ENCQUOTEDPRINTABLE, ENCBASE64, ENCBINARY }; const char MimeSpecials[] = "@.,;<>[]\\\"()?/="; const char *Charset = "iso-8859-15"; /* XXX - hack */ int Index_hex[128] = { -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,-1,-1, -1,-1,-1,-1, -1,10,11,12, 13,14,15,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,10,11,12, 13,14,15,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1 }; int Index_64[128] = { -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,62, -1,-1,-1,63, 52,53,54,55, 56,57,58,59, 60,61,-1,-1, -1,-1,-1,-1, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10, 11,12,13,14, 15,16,17,18, 19,20,21,22, 23,24,25,-1, -1,-1,-1,-1, -1,26,27,28, 29,30,31,32, 33,34,35,36, 37,38,39,40, 41,42,43,44, 45,46,47,48, 49,50,51,-1, -1,-1,-1,-1 }; #define IsPrint(c) (isprint((unsigned char)(c)) || \ ((unsigned char)(c) >= 0xa0)) #define hexval(c) Index_hex[(unsigned int)(c)] #define base64val(c) Index_64[(unsigned int)(c)] static int rfc2047_decode_word (char *d, const char *s, size_t dlen) { char *p = safe_strdup (s); char *pp = p; char *pd = d; size_t len = dlen; int enc = 0, filter = 0, count = 0, c1, c2, c3, c4; #ifdef HAVE_ICONV char *fromcharset; iconv_t cd; size_t in; #endif while ((pp = strtok (pp, "?")) != NULL) { count++; switch (count) { case 2: if (strcasecmp (pp, Charset) != 0) { filter = 1; #ifdef HAVE_ICONV fromcharset = safe_strdup (pp); #endif } break; case 3: if (toupper (*pp) == 'Q') enc = ENCQUOTEDPRINTABLE; else if (toupper (*pp) == 'B') enc = ENCBASE64; else return (-1); break; case 4: if (enc == ENCQUOTEDPRINTABLE) { while (*pp && len > 0) { if (*pp == '_') { *pd++ = ' '; len--; } else if (*pp == '=') { *pd++ = (hexval(pp[1]) << 4) | hexval(pp[2]); len--; pp += 2; } else { *pd++ = *pp; len--; } pp++; } *pd = 0; } else if (enc == ENCBASE64) { while (*pp && len > 0) { c1 = base64val(pp[0]); c2 = base64val(pp[1]); *pd++ = (c1 << 2) | ((c2 >> 4) & 0x3); if (--len == 0) break; if (pp[2] == '=') break; c3 = base64val(pp[2]); *pd++ = ((c2 & 0xf) << 4) | ((c3 >> 2) & 0xf); if (--len == 0) break; if (pp[3] == '=') break; c4 = base64val(pp[3]); *pd++ = ((c3 & 0x3) << 6) | c4; if (--len == 0) break; pp += 4; } *pd = 0; } break; } pp = 0; } safe_free (&p); if (filter) { #ifdef HAVE_ICONV if ((cd = iconv_open (Charset, fromcharset)) == (iconv_t)(-1)) { #endif pd = d; while (*pd) { if (!IsPrint (*pd)) *pd = '?'; pd++; } #ifdef HAVE_ICONV } else { p = safe_strdup (d); pp = p; in = strlen (d) + 1; pd = d; /* maximum available buffer length for converted string */ len = dlen; while (*pd && iconv (cd, &pp, &in, &pd, &len) == (size_t)(-1)) { if (errno == E2BIG) break; *pd = '?'; pp++; in--; pd++; len--; } iconv (cd, NULL, NULL, &pd, &len); iconv_close (cd); safe_free (&p); } safe_free (&fromcharset); #endif } return (0); } /* try to decode anything that looks like a valid RFC2047 encoded * header field, ignoring RFC822 parsing rules */ void rfc2047_decode (char *d, const char *s, size_t dlen) { const char *p, *q; size_t n; int found_encoded = 0; dlen--; /* save room for the terminal nul */ while (*s && dlen > 0) { if ((p = strstr (s, "=?")) == NULL || (q = strchr (p + 2, '?')) == NULL || (q = strchr (q + 1, '?')) == NULL || (q = strstr (q + 1, "?=")) == NULL) { /* no encoded words */ if (d != s) strfcpy (d, s, dlen + 1); return; } if (p != s) { n = (size_t) (p - s); /* ignore spaces between encoded words */ if (!found_encoded || strspn (s, " \t\r\n") != n) { if (n > dlen) n = dlen; if (d != s) memcpy (d, s, n); d += n; dlen -= n; } } rfc2047_decode_word (d, p, dlen); found_encoded = 1; s = q + 2; n = strlen (d); dlen -= n; d += n; } *d = 0; } void rfc2047_decode_adrlist (ADDRESS *a) { while (a) { if (a->personal && strstr (a->personal, "=?") != NULL) rfc2047_decode (a->personal, a->personal, strlen (a->personal) + 1); a = a->next; } } lbdb-0.38ubuntu1/lbdb_ldap.rc0000664000000000000000000000720210626515461013023 0ustar # -*- perl -*- # # $Id: lbdb_ldap.rc,v 1.10 2007-05-28 09:04:49 roland Exp $ # # The format of each entry of the ldap server database is the following: # LDAP_NICKNAME => ['LDAP_SERVER', # 'LDAP_SEARCH_BASE', # 'LDAP_SEARCH_FIELDS', # 'LDAP_EXPECTED_ANSWERS', # 'LDAP_RESULT_EMAIL', # 'LDAP_RESULT_REALNAME', # 'LDAP_RESULT_COMMENT', # 'IGNORANT' (optional), # 'LDAP_BIND_DN' (optional), # 'LDAP_BIND_PASSWORD (optional)], # (IGNORANT is an optional argument. If you set it to 1, mutt_ldap_query # uses wildcards *foo* for searching). # (LDAP_BIND_DN and LDAP_BIND_PASSWORD are optional arguments. Leave them # out or empty to use and anonymous bind) # A practical illustrating example being: # debian => ['db.debian.org', 'ou=users,dc=debian,dc=org', # 'uid cn sn ircnick', 'uid cn sn ircnick', # '${uid}@debian.org', '${cn} ${sn}', '${ircnick}'], # the output of the query will be then: # ${uid}@debian.org\t${cn} ${sn}\t${ircnick} (i.e.: email name comment) # warning this database will erase default script builtin %ldap_server_db = ( 'four11' => ['ldap.four11.com', 'c=US', 'givenname sn cn mail', 'givenname cn sn mail o', '${mail}', '${givenname} ${sn}', '${o}' ], 'infospace' => ['ldap.infospace.com', 'c=US', 'givenname sn cn mail', 'givenname cn sn mail o', '${mail}', '${givenname} ${sn}', '${o}' ], 'whowhere' => ['ldap.whowhere.com', 'c=US', 'givenname sn cn mail', 'givenname cn sn mail o', '${mail}', '${givenname} ${sn}', '${o}' ], 'bigfoot' => ['ldap.bigfoot.com', 'c=US', 'givenname surname cn mail', 'mail cn l', '${mail}', '${cn}', '${l}' ], 'switchboard' => ['ldap.switchboard.com', 'c=US', 'givenname sn cn mail', 'givenname cn sn mail o', '${mail}', '${givenname} ${sn}', '${o}' ], 'infospacebiz' => ['ldapbiz.infospace.com', 'c=US', 'givenname sn cn mail', 'givenname cn sn mail o', '${mail}', '${givenname} ${sn}', '${o}' ], 'debian' => ['db.debian.org', 'ou=users,dc=debian,dc=org', 'uid cn sn ircnick', 'uid cn sn ircnick', '${uid}@debian.org', '${cn} ${sn}', '${ircnick}' ], 'crm' => ['ldap.crm.mot.com', 'o=Motorola,c=US', 'cn mail sn fn uid', 'cn fn sn mail business_group telephonenumber', '${mail}', '${fn} ${sn}', '(${telephonenumber}) ${business_group}' ], 'motorola' => ['ldap.mot.com', 'ou=employees, o=Motorola,c=US', 'commonName gn sn cn uid', 'gn sn preferredRfc822Recipient ou c telephonenumber', '${preferredRfc822Recipient}', '${gn} ${sn}', '(${telephonenumber}) ${ou} ${c}' ] ); # hostname of your ldap server $ldap_server = 'db.debian.org'; # ldap base search $search_base = 'ou=users,dc=debian,dc=org'; # list of the fields that will be used for the query $ldap_search_fields = 'uid cn sn ircnick'; # list of the fields that will be used for composing the answer $ldap_expected_answers = 'uid cn sn ircnick'; # format of the email result based on the expected answers of the ldap query $ldap_result_email = '${uid}@debian.org'; # format of the realname result based on the expected answers of the ldap query $ldap_result_realname = '${cn} ${sn}'; # format of the comment result based on the expected answers of the ldap query $ldap_result_comment = '(${ircnick})'; # Don't use wildchars on searching $ignorant = 0; # Do an anonymous bind to the LDAP server: $ldap_bind_dn = ''; $ldap_bind_password = ''; 1; lbdb-0.38ubuntu1/helpers.c0000664000000000000000000000452310330705650012374 0ustar /* * The functions in this file have completely been stolen * from the Mutt mail user agent, with some slight * modifications by Thomas Roessler to * use them in the "little brother database". * * The following copyright notice applies: * * Copyright (C) 1996-8 Michael R. Elkins * * This program is free software; you can * redistribute it and/or modify it under the terms * of the GNU General Public License as published by * the Free Software Foundation; either version 2 of * the License, or (at your option) any later * version. * * This program is distributed in the hope that it * will be useful, but WITHOUT ANY WARRANTY; without * even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,, USA. */ /* $Id: helpers.c,v 1.5 2005-10-29 14:48:08 roland Exp $ */ #include #include #include #include #include "helpers.h" void *safe_calloc (size_t nmemb, size_t size) { void *p; if (!nmemb || !size) return NULL; if (!(p = calloc (nmemb, size))) { perror ("Out of memory"); sleep (1); exit (1); } return p; } void *safe_malloc (unsigned int siz) { void *p; if (siz == 0) return 0; if ((p = (void *) malloc (siz)) == 0) { perror ("Out of memory!"); sleep (1); exit (1); } return (p); } void safe_realloc (void **p, size_t siz) { void *r; if (siz == 0) { if (*p) { free (*p); *p = NULL; } return; } if (*p) r = (void *) realloc (*p, siz); else { /* realloc(NULL, nbytes) doesn't seem to work under SunOS 4.1.x */ r = (void *) malloc (siz); } if (!r) { perror ("Out of memory!"); sleep (1); exit (1); } *p = r; } void safe_free (void *ptr) { void **p = (void **)ptr; if (*p) { free (*p); *p = 0; } } char *safe_strdup (const char *s) { char *p; size_t l; if (!s || !*s) return 0; l = strlen (s) + 1; p = (char *)safe_malloc (l); memcpy (p, s, l); return (p); } lbdb-0.38ubuntu1/m_getent.sh.in0000664000000000000000000000237010330705651013330 0ustar #! @SH@ # # -*-sh-*- # # Copyright (C) 2000-2001 Ross Campbell # Copyright (C) 2000-2005 Roland Rosenfeld # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software Foundation, # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,, USA. # # $Id: m_getent.sh.in,v 1.5 2005-10-29 14:48:09 roland Exp $ m_getent_query() { GETENT=@GETENT@ if [ -x "$GETENT" ] #check for getent then f_user="`echo \"$@\" | sed -e 's/@.*//'`" HOST="`lbdb_hostname`" $GETENT passwd \ | grep -ia "$f_user" \ | sed -e "s/^\([^:]*\):[^:]*:\([^:]*\):[^:]*:\([^:,]*\)[,:].*\$/\1@$HOST \3 UID \2/" fi } lbdb-0.38ubuntu1/lbdb-fetchaddr.sh.in0000664000000000000000000000547310711134740014360 0ustar #! @SH@ # # -*-sh-*- # Copyright (C) 1998-2000 Thomas Roessler # 1999-2005 Roland Rosenfeld # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software Foundation, # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,, USA. # # $Id: lbdb-fetchaddr.sh.in,v 1.20 2007-10-28 16:33:36 roland Exp $ LBDB_VERSION=@LBDB_VERSION@ umask 077 prefix=@prefix@ exec_prefix=@exec_prefix@ dotlock=@DOTLOCK@ fetchaddr=@libdir@/fetchaddr db=$HOME/.lbdb/m_inmail.list datefmt='%Y-%m-%d %H:%M' additional_param="" usage() { echo "Usage: $0 [OPTIONS]" echo " dig addresses from stdin with formatted timestamp" echo "Options:" echo " -v print version of lbdbq" echo " -h this short help" echo " -d 'dateformat' select date format using strftime(3)" echo " -x 'from:to:cc' colon separated list of header fields" echo " -c 'charset' charset for the database storage" echo " -a also grep addresses without realname" } while [ $# -gt 0 ] do case "$1" in -v) echo "lbdb-fetchaddr version $LBDB_VERSION" exit 0 ;; -h) usage exit 0 ;; -d) if [ $# -gt 1 ] then shift datefmt="$1" fi ;; -x) if [ $# -gt 1 ] then shift hdrlist="-x $1" fi ;; -c) if [ $# -gt 1 ] then shift charset="-c $1" fi ;; -a) additional_param="$additional_param $1" ;; *) if [ $# -eq 1 ] then # backward compatibility: # only one parameter means, that this is the selected datefmt datefmt="$1" else echo "Wrong number of parameters!" usage exit 1 fi ;; esac shift done if [ ! -f $db ]; then dbdir=`dirname $db` if [ ! -d $dbdir ]; then mkdir -p $dbdir if [ ! -d $dbdir ]; then echo "Can't create $dbdir" >&2 exit 1 fi fi touch $db if [ ! -f $db ]; then echo "Can't create $db" >&2 exit 1 fi fi if $dotlock -r 10 -f $db then : # okay, do nothing else echo "Can't lock $db [dotlock returned $rv]." >&2 exit 1 fi if $fetchaddr $additional_param -d "$datefmt" $hdrlist $charset >> $db ; then touch $db.dirty fi $dotlock -u $db lbdb-0.38ubuntu1/m_osx_addressbook.sh.in0000664000000000000000000000174211214161326015232 0ustar #! @SH@ # # -*-sh-*- # # Copyright (C) 2003 Brendan Cully # Copyright (C) 2005 Roland Rosenfeld # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software Foundation, # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,, USA. # libdir=@libdir@ m_osx_addressbook_query() { $libdir/ABQuery "$@" | grep -ia "$@" || : } lbdb-0.38ubuntu1/m_pgp5.sh.in0000664000000000000000000000227011214161326012711 0ustar #! @SH@ # # -*-sh-*- # # Copyright (C) 1999-2005 Roland Rosenfeld # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software Foundation, # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,, USA. # # $Id: m_pgp5.sh.in,v 1.13 2009-06-11 10:56:22 roland Exp $ # m_pgp5_query() { PGPK=@PGPK@ if [ -x "$PGPK" ] then $PGPK +language=en -l "$@" 2>/dev/null \ | grep -a '^uid ...* <[^<>@:/ ]*@[^<>@ ]*>[^<>@]*$' \ | sed -e 's/^uid \(.*\) <\(.*\)>.*$/\2 \1 (PGP5)/' \ | sed -e 's/ \([^ ]\{27,27\}\)[^ ]* / \1... /' \ | grep -ia "$@" || : fi } lbdb-0.38ubuntu1/m_addr_email.sh.in0000664000000000000000000000271711214161326014125 0ustar #! @SH@ # # -*-sh-mode-*- # # Copyright (C) 2000 Torsten Jerzembeck # Copyright (C) 2000 Ross Campbell # Copyright (C) 2000-2005 Roland Rosenfeld # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software Foundation, # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,, USA. # # This is a frontend to addr-email(1) from the addressbook(1) package, # which can be found at http://red.roses.de/~clemens/addressbook/. # # $Id: m_addr_email.sh.in,v 1.6 2009-06-11 10:56:22 roland Exp $ m_addr_email_query() { ADDR_EMAIL=@ADDR_EMAIL@ if [ -x "$ADDR_EMAIL" ] # check whether addr-email in installed then $ADDR_EMAIL "$@" \ | sed -e 's/^\([^,]*\), \([^:]*\): \(.*\)$/\3 \1 \2/' \ | grep -a '@' || : # | sed -e 's/\(.*\):[ ]\([^ ].*$\)/\2 \1 addr-email/' fi } lbdb-0.38ubuntu1/m_wanderlust.sh.in0000664000000000000000000000226711214161326014234 0ustar #! @SH@ ## -*- sh -*- ## ## Copyright (C) 2002 Gergely Nagy ## Copyright (C) 2002-2005 Roland Rosenfeld ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by ## the Free Software Foundation; either version 2 of the License, or ## (at your option) any later version. ## ## This program is distributed in the hope that it will be useful, ## but WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ## GNU General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with this program; if not, write to the Free Software Foundation, ## Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,, USA. # # $Id: m_wanderlust.sh.in,v 1.7 2009-06-11 10:56:22 roland Exp $ m_wanderlust_query() { addresses=${WANDERLUST_ADDRESSES:-${HOME}/.addresses} if [ -f $addesses ] then grep -ia "$@" $addresses \ | sed -e 's,^\([^ ]\+\)[ ]\+"\([^"]*\)"[ ]\+"\([^"]\+\)",\1 \3 wl \2,g' \ | grep -a '^[^ ][^ ]* [^ ][^ ]* wl ' || : fi } lbdb-0.38ubuntu1/nodelist2lbdb.man.in0000664000000000000000000000272010330705653014417 0ustar .\" -*-nroff-*- .\" Copyright (c) 1999-2005 Roland Rosenfeld .\" .\" This manual page is free software; you can redistribute it and/or modify .\" it under the terms of the GNU General Public License as published by .\" the Free Software Foundation; either version 2 of the License, or .\" (at your option) any later version. .\" .\" This program is distributed in the hope that it will be useful, .\" but WITHOUT ANY WARRANTY; without even the implied warranty of .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the .\" GNU General Public License for more details. .\" .\" You should have received a copy of the GNU General Public License .\" along with this program; if not, write to the Free Software Foundation, .\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,, USA. .\" .TH NODELIST2LBDB 1 "October 2005" Unix "User Manuals" .SH NAME nodelist2lbdb \- convert Fido nodelist and pointlist to lbdb format .SH SYNOPSIS .B nodelist2lbdb .BI nodelist. XXX .BI [point24. XXX ] .SH DESCRIPTION This little script reads in a Fido named .BI nodelist. XXX and optionally a Fido point list named .BI points24. YYY and generates a list with the lbdb format: .nf TAB TAB .fi This file is written to .I $HOME/.lbdb/nodelist .SH FILES .I $HOME/.lbdb/nodelist .br .I @libdir@/m_fido .SH "SEE ALSO" .BR lbdbq (1) .SH AUTHORS .B nodelist2lbdb is written by Roland Rosenfeld . lbdb-0.38ubuntu1/lbdb.rc.in0000664000000000000000000001555310514151702012426 0ustar # # This is the main configuration file of the little brothers database lbdb # # Everything you configure here can be overridden by the users config # file which can be found at # ~/.lbdbrc # ~/.lbdb/lbdbrc # ~/.lbdb/rc # (evaluated with ascending priority!) # # (c) 1999-2006 Roland Rosenfeld # # $Id: lbdb.rc.in,v 1.18 2006-10-14 12:10:42 roland Exp $ # # # Select which methods you want to use in which order (ascending priority): # (a space separated list) # # - m_inmail search the database created by lbdb-fetchaddr(1) # - m_finger finger some hosts defined in variable M_FINGER_HOSTS # - m_passwd search the local /etc/passwd file. # - m_yppasswd search the NIS password database. # - m_nispasswd search the NIS+ password database. # - m_getent search the password database (whatever is configured). # - m_pgp2 search your PGP 2.* keyring # - m_pgp5 search your PGP 5.* keyring # - m_gpg search your GnuPG keyring # - m_fido search the Fido nodelist converted by nodelist2lbdb(1) # - m_abook query abook(1), the text based address book application. # - m_addr_email query addr-email(1) from addressbook Tk-program. # - m_muttalias search $MUTTALIAS_FILES for aliases. # - m_pine search pine(1) addressbook files for aliases. # - m_palm search your Palm addressbook file. # - m_gnomecard search your GnomeCard address database files. # - m_bbdb search your BBDB (big brother database). # - m_ldap query an LDAP server # - m_wanderlust search your wanderlust ~/.addresses file. # - m_osx_addressbook search the OS X addressbook (only available on OS X). # - m_evolution search in the Ximan Evolution addressbook. # - m_vcf search a vcard (according to RFC2426) file. METHODS="m_inmail m_passwd m_finger" # # If you want m_finger to ask other host then localhost, create a list here: # (a space separated list): # #M_FINGER_HOSTS="master.debian.org va.debian.org localhost" # # If it isn't possible to find out the correct mail domain name of # your system in /etc/mailname, by reading sendmail.cf, /etc/hostname # or /etc/HOSTNAME, you can specify it in the variable # MAIL_DOMAIN_NAME. This overrides all other mechanisms. # #MAIL_DOMAIN_NAME=does-not-exist.org # - m_muttalias query set of mutt alias files: # # Set MUTTALIAS_FILES below to list of files in MUTT_DIRECTORY that # contain mutt aliases. File names without leading slash will have # $MUTT_DIRECTORY (defaults to $HOME/.mutt or $HOME, if ~/.mutt does # not exist) prepended before the file name. Absolute file names # (beginning with /) will be taken direct. # #MUTT_DIRECTORY="$HOME/.mutt" #MUTTALIAS_FILES=".muttrc .mail_aliases muttrc aliases" # - m_pine search pine addressbook files for aliases: # # This module first inspects the variable PINERC. If it isn't set, the # default `/etc/pine.conf /etc/pine.conf.fixed .pinerc' is used. To # suppress inspecting the PINERC variable, set it to "no". It than # takes all address-book and global-address-book entries from these # pinerc files and adds the contents of the variable PINE_ADDRESSBOOKS # to the list, which defaults to `/etc/addressbook .addressbook'. Then # these addressbooks are searched for aliases. All filenames without # leading slash are searched in $HOME. # #PINERC="/etc/pine.conf /etc/pine.conf.fixed .pinerc" #PINE_ADDRESSBOOKS="/etc/addressbook .addressbook" # - m_wanderlust search your WanderLust addresses files: # # Set WANDERLUST_ADDRESSES below to point to your WanderLust address # book. If you don't set this variable, the default # ($HOME/.addresses) is used. # #WANDERLUST_ADDRESSES="$HOME/.addresses" # - m_palm search your Palm addressbook file: # # This module searches the Palm address database using the Palm::PDB # and Palm::Address Perl modules from CPAN. It searches in the # variable PALM_ADDRESS_DATABASE or if this isn't set in # $HOME/.jpilot/AddressDB.pdb. # #PALM_ADDRESS_DATABASE="$HOME/.jpilot/AddressDB.pdb" # - m_gnomecard search your GnomeCard address database files. # # This module searches for addresses in your GnomeCard database files. # The variable GNOMECARD_FILES is a whitespace separated list of # GnomeCard data files. If this variable isn't defined, the module # searches in $HOME/.gnome/GnomeCard for the GnomeCard database or at # least falls back to $HOME/.gnome/GnomeCard.gcrd. If a filename does # not start with a slash, it is prefixed with $HOME/. # #GNOMECARD_FILES="$HOME/.gnome/GnomeCard.gcrd" # - m_bbdb search your BBDB (big brother database). # # This module searches for addresses in your (X)Emacs BBDB (big # brother database). It doesn't access ~/.bbdb directly (yet) but # calls emacs(1) or xemacs(1) with a special mode to get the # information (so don't expect too much performance in this module). # You can configure the EMACS variable to tell this module which # emacsen to use. Otherwise it will fall back to emacs or xemacs. # #EMACS="emacs" # - m_ldap query an LDAP server. # # This module queries an LDAP server using the Net::LDAP Perl modules # from CPAN. It can be configured using an external resource file. You # can explicity define a LDAP query in this file or you can use one or # more of the predefined queries from the %ldap_server_db in this # file. For this you have to define the selected enties as a space # separated list in the the variable LDAP_NICKS. # #LDAP_NICKS="debian bigfoot" # - m_abook query the abook(1) programm # # if you have more than one abook addressbook, use the ABOOK_FILES # variable. It contains a space separated list of all your files. # Default is $HOME/.abook/addressbook $HOME/.abook.addressbook # ABOOK_FILES="$HOME/.abook/friends $HOME/.abook/work" # - m_passwd search in /etc/passwd # # On a Debian system only the UIDs 1000-29999 are used for normal # users. Setting PASSWD_IGNORESYS to "true" implies that lbdbq # ignores and UID, which isn't in that range: #PASSWD_IGNORESYS=true # - m_vcf search in vcard files # # You have to define the vcard files space separated in $VCF_FILES to # make this module work: #VCF_FILES=$HOME/my.vcf # # If you want to use private modules set the MODULES_PATH to find them: # (a space separated list): # #MODULES_PATH="/usr/lib/lbdb $HOME/.lbdb/modules" # # Do you want the output to be sorted? # If you set this to "false" or "no", lbdbq won't sort the addresses # but returns them in reverse order (which means that the most recent # address in m_inmail database is first). # If you set this to "name", lbdbq sorts the output by real name. # If you set this to "comment", lbdbq sorts the output by comment (column 3). # If you set this to "reverse_comment", lbdbq sorts the output by comment # but with reverse order (column 3). # If you set this to "address", lbdbq sorts the output by addresses # (that's the default). # #SORT_OUTPUT=address # # Do you want to see duplicate mail addresses (with multiple real # names or different comment fields)? Default is "no". # #KEEP_DUPES=no lbdb-0.38ubuntu1/m_inmail.sh.in0000664000000000000000000000224411214161326013310 0ustar #! @SH@ # # Copyright (C) 1998-2000 Thomas Roessler # 1999-2005 Roland Rosenfeld # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software Foundation, # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,, USA. # # $Id: m_inmail.sh.in,v 1.14 2009-06-11 10:56:22 roland Exp $ prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ m_inmail_db=$HOME/.lbdb/m_inmail.list m_inmail_query() { export SORT_OUTPUT $libdir/lbdb-munge test -f $m_inmail_db || return grep -ia "$@." $m_inmail_db || : } lbdb-0.38ubuntu1/qpto8bit.c0000664000000000000000000000241410711134740012500 0ustar /* * Copyright (C) 2000-2005 Roland Rosenfeld * * This program is free software; you can redistribute * it and/or modify it under the terms of the GNU * General Public License as published by the Free * Software Foundation; either version 2 of the License, * or (at your option) any later version. * * This program is distributed in the hope that it will * be useful, but WITHOUT ANY WARRANTY; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A * PARTICULAR PURPOSE. See the GNU General Public * License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,, USA. * */ /* $Id: qpto8bit.c,v 1.4 2007-10-28 16:33:36 roland Exp $ */ #include #include "helpers.h" #include "rfc822.h" #include "rfc2047.h" int main (int argc, char * argv[]) { char buff[2048]; #ifdef HAVE_ICONV const char **charsetptr = &Charset; #endif #ifdef HAVE_ICONV if (argc > 1) *charsetptr = argv[1]; #endif while (fgets (buff, sizeof (buff), stdin)) { rfc2047_decode (buff, buff, sizeof (buff)); fputs (buff, stdout); } return 0; } lbdb-0.38ubuntu1/COPYING0000664000000000000000000004310510330705650011620 0ustar GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. lbdb-0.38ubuntu1/README0000664000000000000000000002124710626242156011455 0ustar $Id: README,v 1.37 2007-05-27 08:42:22 roland Exp $ The Little Brother's Database Roland Rosenfeld (current maintainer) Thomas Roessler (initial author) This package was inspired by the Big Brother Database package available for various Emacs mailers, and by Brandon Long's "external query" patch for the mutt mail user agent (Note that this patch has been incorporated into the main-line mutt versions as of mutt 0.93.) The package doesn't use any formal database libraries or languages, although it should be quite easy to extend it to use, e.g., an installed PostgreSQL server as it's backend. For querying the Little Brother, just type "lbdbq ". lbdbq will now attempt to invoke various modules to gather information about persons matching "". E.g., it may look at a list of addresses from which you have received mail, it may look at YP maps, or it may try to finger @. The behavior is configurable: Upon startup, lbdbq will source the shell scripts /usr/local/etc/lbdb.rc (or where your @sysconfdir@ points to) $HOME/.lbdbrc $HOME/.lbdb/lbdbrc $HOME/.lbdb/rc if they exist. They can be used to set the following global variables: - MODULES_PATH: Where lbdbq should look for modules - METHODS: What modules to use. - SORT_OUTPUT: Set this to "false" or "no" and lbdbq won't sort the addresses but returns them in reverse order (which means that the most recent address in m_inmail database is first). If you set this to "name", lbdbq sorts the output by real name. If you set this to "comment", it sort the output by the comment (for example the date in m_inmail). If you set this to "address", lbdbq sorts the output by addresses (that's the default). Note that there _are_ defaults, so you should most probably modify these variables using constructs like this: MODULES_PATH="MODULES_PATH $HOME/lbdb_modules" Additionally, modules may have configuration variables of their own. Currently the following modules are supplied with lbdb: m_finger This module will use finger to find out something more about a person. The list of hosts do be asked is configurable; use the M_FINGER_HOSTS variable. Note that "localhost" will mean an invocation of your local finger(1) binary, and should thus work even if you don't provide the finger service to the network. m_finger tries to find out the machines mail domain name in /etc/mailname, by parsing a sendmail.cf file (if it finds one) and by reading /etc/hostname and /etc/HOSTNAME. m_inmail This module will look up user name fragments in a list of mail addresses created by lbdb-fetchaddr(1). m_passwd This module searches for matching entries in your local /etc/passwd file. It evaluates the local machine mail domain in the same way m_finger does. If you set PASSWD_IGNORESYS=true, this module ignores all system accounts and only finds UIDs between 1000 and 29999 (all other UIDs are reserved on a Debian system). m_yppasswd This module searches for matching entries in your NIS password file using the command "ypcat passwd". m_nispasswd This module searches for matching entries in the NIS+ password database using the command ``niscat passwd.org_dir''. m_getent This module searches for matching entries in whatever password database is configured using the command ``getent passwd''. m_pgp2, m_pgp5, m_gpg These modules scan your PGP 2.*, PGP 5.* or GnuPG public key ring for data. They use the programs pgp(1), pgpk(1), or gpg(1) to get the data. m_fido This module searches your Fido nodelist, stored in $HOME/.lbdb/nodelist created by nodelist2lbdb(1). m_abook This module uses the program abook (http://www.linuxstart.com/~jheinonen/abook/), a text based address book application to search for addresses. You can define multiple abook address books by setting the variable ABOOK_FILES to a space separated list. m_addr_email This module uses addr-email from the addressbook (http://red.roses.de/~clemens/addressbook/) Tk program to search for addresses. m_muttalias This module searches the variable MUTTALIAS_FILES (a space separated list) of files in MUTT_DIRECTORY that contain mutt aliases. File names without leading slash will have MUTT_DIRECTORY (defaults to $HOME/.mutt or $HOME, if $HOME/.mutt does not exist) prepended before the file name. Absolute file names (beginning with /) will be taken direct. m_pine This module searches pine(1) addressbook files for aliases. To realize this it first inspects the variable PINERC. If it isn't set, the default `/etc/pine.conf /etc/pine.conf.fixed .pinerc' is used. To suppress inspecting the PINERC variable, set it to "no". It than takes all address-book and global-address-book entries from these pinerc files and adds the contents of the variable PINE_ADDRESSBOOKS to the list, which defaults to `/etc/addressbook .addressbook'. Then these addressbooks are searched for aliases. All filenames without leading slash are searched in $HOME. m_palm This module searches the Palm address database using the Palm::PDB and Palm::Address Perl modules from CPAN. It searches in the variable PALM_ADDRESS_DATABASE or if this isn't set in $HOME/.jpilot/AddressDB.pdb. m_gnomecard This module searches for addresses in your GnomeCard database files. The variable GNOMECARD_FILES is a whitespace separated list of GnomeCard data files. If this variable isn't defined, the module searches in $HOME/.gnome/GnomeCard for the GnomeCard database or at least falls back to $HOME/.gnome/GnomeCard.gcrd. If a filename does not start with a slash, it is prefixed with $HOME/. m_bbdb This module searches for addresses in your (X)Emacs BBDB (big brother database). It doesn't access ~/.bbdb directly (yet) but calls (x)emacs with a special mode to get the information (so don't expect too much performance in this module). You can configure the EMACS variable to tell this module which emacsen to use. Otherwise it will fall back to emacs or xemacs. m_ldap This module queries an LDAP server using the Net::LDAP Perl modules from CPAN. It can be configured using an external resource file (for more details please refer to the mutt_ldap_query(1) manual page). m_wanderlust This module searches for addresses stored in your $WANDERLUST_ADDRESSES (or by default in $HOME/.addresses) file, an addressbook of WanderLust. m_osx_addressbook This module queries the OS X AddressBook. It is only available on OS X systems. m_evolution This module queries the Ximian Evolution address book using the evolution-addressbook-export application. m_vcf This module uses libvformat to search for addresses from the space-separated set of vCard files defined in $VCF_FILES. Feel free to create your own modules to query other kinds of databases. m_finger should be a good example of how to do it. If you create your own modules or have other changes and feel that they could be helpful for others, don't hesitate to submit them to me for inclusion in later releases. Finally, to use lbdbq from mutt, add the following line to your ~/.muttrc: set query_command="lbdbq %s" CREDITS ------- Most of the really interesting code of this program (namely, the RFC 822 address parser used by lbdb-fetchaddr) was stolen from Michael Elkins' mutt mail user agent. Additional credits go to Brandon Long for putting the query functionality into mutt. Many thanks to the authors of the several modules and extensions: - Ross Campbell (m_abook, m_yppasswd) - Marc de Courville (m_ldap, mutt_ldap_query) - Brendan Cully (m_osx_addressbook, m_vcf) - Gabor Fleischer (m_pine) - Rick Frankel (m_gnomecard) - Guido Guenther (m_evolution) - Utz-Uwe Haus (m_bbdb, m_nispasswd) - Torsten Jerzembeck (m_addr_email) - Gergely Nagy (m_wanderlust) - Dave Pearson (m_palm, lbdb.el) - Brian Salter-Duke (m_muttalias) lbdb-0.38ubuntu1/lbdb.el0000664000000000000000000003073207334555506012031 0ustar ;;; lbdb.el - Little Brother's Database interface. ;; Copyright 2000,2001 by Dave Pearson ;; $Revision: 1.10 $ ;; lbdb.el is free software distributed under the terms of the GNU ;; General Public Licence, version 2. For details see the file COPYING. ;;; Commentary: ;; ;; lbdb.el is an emacs interface to the Little Brother's Database. You can ;; find out more about LBDB at . ;; ;; A number of commands are provided, they are: ;; ;; +-------------------+---------------------------------------------+ ;; |Function |Description | ;; +-------------------+---------------------------------------------+ ;; | lbdb |Perform an interactive query. You will be | ;; | |prompted for the text to search for. | ;; +-------------------+---------------------------------------------+ ;; | lbdb-region |Perform a lbdb query using the content of the| ;; | |currently marked region as the text to search| ;; | |for. | ;; +-------------------+---------------------------------------------+ ;; | lbdb-maybe-region |If a mark is active do lbdb-region, if no | ;; | |mark is active do lbdb. | ;; +-------------------+---------------------------------------------+ ;; | lbdb-last |Recall and work with the results of the last | ;; | |query you performed. | ;; +-------------------+---------------------------------------------+ ;; ;; The latest lbdb.el is always available from: ;; ;; ;;; BUGS: ;; ;; o Mouse selection doesn't work in XEmacs. ;;; INSTALLATION: ;; ;; o Drop lbdb.el somwehere into your `load-path'. Try your site-lisp ;; directory for example (you might also want to byte-compile the file). ;; ;; o Add the following autoload statements to your ~/.emacs file: ;; ;; (autoload 'lbdb "lbdb" "Query the Little Brother's Database" t) ;; (autoload 'lbdb-region "lbdb" "Query the Little Brother's Database" t) ;; (autoload 'lbdb-maybe-region "lbdb" "Query the Little Brother's Database" t) ;;; Code: ;; Things we need: (eval-when-compile (require 'cl)) ;; Attempt to handle older/other emacs. (eval-and-compile ;; If customize isn't available just use defvar instead. (unless (fboundp 'defgroup) (defmacro defgroup (&rest rest) nil) (defmacro defcustom (symbol init docstring &rest rest) `(defvar ,symbol ,init ,docstring))) ;; If `line-beginning-position' isn't available provide one. (unless (fboundp 'line-beginning-position) (defun line-beginning-position (&optional n) "Return the `point' of the beginning of the current line." (save-excursion (beginning-of-line n) (point)))) ;; If `line-end-position' isn't available provide one. (unless (fboundp 'line-end-position) (defun line-end-position (&optional n) "Return the `point' of the end of the current line." (save-excursion (end-of-line n) (point))))) ;; Customize options. (defgroup lbdb nil "Little Brother's Database interface" :group 'external :prefix "lbdb-") (defcustom lbdb-query-command "lbdbq" "*Command for querying the Little Brother's Database." :type 'string :group 'lbdb) (defcustom lbdb-sort-display 'name "*The method used to sort the results display." :type '(choice (const :tag "Sort by name" name) (const :tag "Sort by email address" email) (const :tag "Don't sort" nil)) :group 'lbdb) (defcustom lbdb-mode-hook nil "*Hooks for `lbdb-mode'." :type 'hook :group 'lbdb) (defcustom lbdb-name-format-function (lambda (entry) (lbdb-name entry)) "*Function to format the name before insertion into the current buffer." :type 'function :group 'lbdb) (defcustom lbdb-address-format-function (lambda (entry) (format "" (lbdb-email entry))) "*Function to format the email address before insertion into the current buffer." :type 'function :group 'lbdb) (defcustom lbdb-full-format-function (lambda (entry) (format "\"%s\" <%s>" (lbdb-name entry) (lbdb-email entry))) "*Function to format the name and email address before insertion into the current buffer." :type 'function :group 'lbdb) (defcustom lbdb-mouse-select-action 'lbdb-insert-full "*Pointer to the function that is called when mouse-2 is pressed." :type '(choice (const :tag "Insert the name/address combination" lbdb-insert-full) (const :tag "Insert only the email address" lbdb-insert-address) (const :tag "Insert only the name" lbdb-insert-name)) :group 'lbdb) ;; Constants. (defconst lbdb-buffer-name "*lbdb*" "Name of the Little Brother's Database buffer.") ;; Non-customize variables. (defvar lbdb-mode-map nil "Local keymap for a `lbdb-mode' buffer.") (defvar lbdb-last-buffer nil "`current-buffer' when `lbdb' was called.") (defvar lbdb-results nil "The results of the current query.") ;; Data access functions. (defsubst lbdb-email (entry) "Return the email address of a lbdb entry." (nth 0 entry)) (defsubst lbdb-name (entry) "Return the name of a lbdb entry." (nth 1 entry)) (defsubst lbdb-method (entry) "Return the acquisition method of a lbdb entry." (nth 2 entry)) ;; Support functions. (defun lbdb-generate-format-string (results) "Generate a `format' string for displaying RESULTS." (loop for line in results for email-len = (length (lbdb-email line)) then (max email-len (length (lbdb-email line))) for name-len = (length (lbdb-name line)) then (max name-len (length (lbdb-name line))) finally return (format "%%-%ds %%-%ds %%s" name-len email-len))) (defun lbdb-line-as-list () "Split the current line into its component parts. The return value is a list, the component parts of that list are: (ADDRESS NAME METHOD) Where ADDRESS is the email address, NAME is the name associated with that email address and METHOD is the method lbdbq used to find that address." (split-string (buffer-substring-no-properties (point) (line-end-position)) "\t")) (defun lbdb-buffer-to-list () "Convert the current buffer into a lbdb result list. It is assumed that the current buffer contains the output of a call to lbdbq." (save-excursion (setf (point) (point-min)) (forward-line) ; Skip the message line. (loop until (eobp) unless (looking-at "^$") collect (lbdb-line-as-list) do (forward-line)))) (defun lbdb-sort (results) "Sort a lbdb result list. The type of sort is controlled by `lbdb-sort-display'." (if lbdb-sort-display (sort results (case lbdb-sort-display (name (lambda (x y) (string< (downcase (lbdb-name x)) (downcase (lbdb-name y))))) (email (lambda (x y) (string< (downcase (lbdb-email x)) (downcase (lbdb-email y))))))) results)) (defun lbdb-mark-active-p () "Is there a mark active? Because there's more than one true emacs." (if (boundp 'mark-active) ;; GNU Emacs. (symbol-value 'mark-active) ;; X Emacs. (funcall (symbol-function 'region-exists-p)))) (defun lbdb-deactivate-mark () "Deactivate any active mark. Because there's more than one true emacs." (when (fboundp 'deactivate-mark) ;; GNU emacs. (funcall (symbol-function 'deactivate-mark)))) ;; Main code. ;;;###autoload (defun lbdb (query) "Interactively query the Little Brother's Database." (interactive "sQuery: ") (lbdb-present-results (lbdbq query (interactive-p)))) ;;;###autoload (defun lbdb-region (start end) "Look for the contents of regioning bounded by START and END." (interactive "r") (lbdb-deactivate-mark) (lbdb (buffer-substring-no-properties start end))) ;;;###autoload (defun lbdb-maybe-region () "If region is active search for content of region otherwise prompt." (interactive) (call-interactively (if (lbdb-mark-active-p) #'lbdb-region #'lbdb))) ;;;###autoload (defun lbdb-last () "Recall and use the results of the last successful query." (interactive) (lbdb-present-results lbdb-results)) (defun lbdb-present-results (results) "Present the results in a buffer and allow the user to interact with them." (if results (let ((format (lbdb-generate-format-string results))) (setq lbdb-results results) (unless (string= (buffer-name) lbdb-buffer-name) (setq lbdb-last-buffer (current-buffer))) (pop-to-buffer lbdb-buffer-name) (let ((buffer-read-only nil)) (setf (buffer-string) "") (loop for line in results do (let ((start (point))) (insert (format format (lbdb-name line) (lbdb-email line) (lbdb-method line)) "\n") (put-text-property start (1- (point)) 'mouse-face 'highlight)))) (setf (point) (point-min)) (lbdb-mode)) (error "No matches found in the Little Brother's Database"))) (defun lbdbq (query &optional interactive) "Query the Little Brother's Database and return a list of results. QUERY is the text to search for. If INTERACTIVE is non-nil the message area will be updated with the progress of the function. This parameter is optional and the deafult is nil." (with-temp-buffer (when interactive (message "Querying the Little Brother's Database...")) (call-process lbdb-query-command nil (current-buffer) nil query) (prog1 (lbdb-sort (lbdb-buffer-to-list)) (when interactive (message "Querying the Little Brother's Database...done"))))) ;; lbdb mode. (unless lbdb-mode-map (let ((map (make-sparse-keymap))) (suppress-keymap map t) (define-key map "a" #'lbdb-insert-address) (define-key map "n" #'lbdb-insert-name) (define-key map (kbd "RET") #'lbdb-insert-full) (define-key map "q" #'lbdb-mode-quit) (define-key map [(control g)] #'lbdb-mode-quit) (define-key map [mouse-2] #'lbdb-mouse-select) (define-key map "?" #'describe-mode) (setq lbdb-mode-map map))) (put 'lbdb-mode 'mode-class 'special) (defun lbdb-mode () "A mode for browsing the results a an `lbdb' query. The key bindings for `lbdb-mode' are: \\{lbdb-mode-map}" (interactive) (kill-all-local-variables) (use-local-map lbdb-mode-map) (setq major-mode 'lbdb-mode mode-name "lbdb") (run-hooks 'lbdb-mode-hook) (setq buffer-read-only t truncate-lines t) (buffer-disable-undo (current-buffer))) (defun lbdb-mode-quit () "Quit the current lbdb buffer." (interactive) (kill-buffer lbdb-buffer-name) (switch-to-buffer lbdb-last-buffer) (delete-other-windows)) (defun lbdb-insert (type) "Insert the details of the lbdb entry under the cursor. TYPE dictates what will be inserted, options are: `name' - Insert the name. `lbdb-name-format-function' is used to format the name. `address' - Insert the address. `lbdb-address-format-function' is used to format the address. `full' - Insert the name and the address. `lbdb-full-format-function' is used to format the name and address." (let ((line (nth (count-lines (point-min) (line-beginning-position)) lbdb-results))) (if line (with-current-buffer lbdb-last-buffer (insert (case type ('name (funcall lbdb-name-format-function line)) ('address (funcall lbdb-address-format-function line)) ('full (funcall lbdb-full-format-function line))))) (error "No details on that line")) line)) (defun lbdb-mouse-select (event) "Select the entry under the mouse click." (interactive "e") (setf (point) (posn-point (event-end event))) (funcall lbdb-mouse-select-action)) (defmacro lbdb-make-inserter (type) "Macro to make a key-response function for use in `lbdb-mode-map'." `(defun ,(intern (format "lbdb-insert-%S" type)) () ,(format "Insert the result of calling `lbdb-insert' with `%s'." type) (interactive) (when (lbdb-insert ',type) (lbdb-mode-quit)))) (lbdb-make-inserter name) (lbdb-make-inserter address) (lbdb-make-inserter full) (provide 'lbdb) ;;; lbdb.el ends here lbdb-0.38ubuntu1/dotlock.h0000664000000000000000000000240510330705650012373 0ustar /* * Copyright (C) 1996-2000 Michael R. Elkins * Copyright (C) 1998-2000 Thomas Roessler * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,, USA. */ #ifndef _DOTLOCK_H #define _DOTLOCK_H /* exit values */ #define DL_EX_OK 0 #define DL_EX_ERROR 1 #define DL_EX_EXIST 3 #define DL_EX_IMPOSSIBLE 5 /* flags */ #define DL_FL_TRY (1 << 0) #define DL_FL_UNLOCK (1 << 1) #define DL_FL_FORCE (1 << 3) #define DL_FL_RETRY (1 << 4) #define DL_FL_UNLINK (1 << 5) #define DL_FL_ACTIONS (DL_FL_TRY|DL_FL_UNLOCK|DL_FL_UNLINK) #endif lbdb-0.38ubuntu1/config.sub0000775000000000000000000007772410711135237012567 0ustar #! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, # Inc. timestamp='2007-06-28' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray) os= basic_machine=$1 ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | mcore | mep \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64vr | mips64vrel \ | mips64orion | mips64orionel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | mt \ | msp430 \ | nios | nios2 \ | ns16k | ns32k \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ | score \ | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64vr-* | mips64vrel-* \ | mips64orion-* | mips64orionel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ | xstormy16-* | xtensa-* \ | ymp-* \ | z8k-*) ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; c90) basic_machine=c90-cray os=-unicos ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16) basic_machine=cr16-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; mvs) basic_machine=i370-ibm os=-mvs ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc) basic_machine=powerpc-unknown ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff ;; tic55x | c55x*) basic_machine=tic55x-unknown os=-coff ;; tic6x | c6x*) basic_machine=tic6x-unknown os=-coff ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -kaos*) os=-kaos ;; -zvmoe) os=-zvmoe ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 # This also exists in the configure program, but was not the # default. # os=-sunos4 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: lbdb-0.38ubuntu1/Makefile.in0000664000000000000000000001401610711134737012636 0ustar # Copyright (C) 1998 Thomas Roessler # Copyright (C) 1999-2005 Roland Rosenfeld # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software Foundation, # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,, USA. # # $Id: Makefile.in,v 1.46 2007-10-28 16:33:35 roland Exp $ CC=@CC@ LDFLAGS=@LDFLAGS@ CFLAGS=@CFLAGS@ CPPFLAGS=@CPPFLAGS@ DEFS=@DEFS@ INSTALL=@INSTALL@ MODULES=@MODULES@ DOTLOCKBASE=@DOTLOCKBASE@ DOTLOCK_TARGET=@DOTLOCK_TARGET@ TACTARGET=@TACTARGET@ PERL=@PERL@ XCODEBUILD=@XCODEBUILD@ PBXBUILD=@PBXBUILD@ VFORMAT=@VFORMAT@ LIBICONV=@LIBICONV@ prefix=@prefix@ exec_prefix=@exec_prefix@ bindir=@bindir@ srcdir=@srcdir@ libdir=@libdir@ mandir=@mandir@ sysconfdir=@sysconfdir@ ALL=lbdbq lbdb_lib lbdb-fetchaddr lbdb-munge fetchaddr qpto8bit munge \ munge-keeporder nodelist2lbdb palm_lsaddr mutt_ldap_query lbdbq.man \ lbdb-fetchaddr.man nodelist2lbdb.man mutt_ldap_query.man lbdb.rc \ $(MODULES) $(DOTLOCK_TARGET) $(TACTARGET) all: Makefile $(ALL) install: all $(srcdir)/mkinstalldirs $(install_prefix)$(bindir) $(srcdir)/mkinstalldirs $(install_prefix)$(libdir) $(srcdir)/mkinstalldirs $(install_prefix)$(sysconfdir) $(srcdir)/mkinstalldirs $(install_prefix)$(mandir) $(srcdir)/mkinstalldirs $(install_prefix)$(mandir)/man1 $(INSTALL) -m 755 fetchaddr $(install_prefix)$(libdir) $(INSTALL) -m 755 qpto8bit $(install_prefix)$(libdir) $(INSTALL) -m 755 lbdbq $(install_prefix)$(bindir) $(INSTALL) -m 755 lbdb-fetchaddr $(install_prefix)$(bindir) $(INSTALL) -m 755 lbdb-munge $(install_prefix)$(libdir) $(INSTALL) -m 755 lbdb_lib $(install_prefix)$(libdir) $(INSTALL) -m 755 munge $(install_prefix)$(libdir) $(INSTALL) -m 644 lbdb_bbdb_query.el $(install_prefix)$(libdir) $(INSTALL) -m 755 munge-keeporder $(install_prefix)$(libdir) if [ "$(PERL)" != "no" ]; then \ $(INSTALL) -m 755 nodelist2lbdb $(install_prefix)$(bindir); \ $(INSTALL) -m 644 nodelist2lbdb.man \ $(install_prefix)$(mandir)/man1/nodelist2lbdb.1; \ $(INSTALL) -m 755 palm_lsaddr $(install_prefix)$(libdir); \ $(INSTALL) -m 755 mutt_ldap_query $(install_prefix)$(libdir); \ $(INSTALL) -m 644 mutt_ldap_query.man \ $(install_prefix)$(mandir)/man1/mutt_ldap_query.1; \ $(INSTALL) -m 644 lbdb_ldap.rc \ $(install_prefix)$(sysconfdir)/lbdb_ldap.rc; \ fi if [ "$(XCODEBUILD)" != "no" -o "$(PBXBUILD)" != "no" ]; then \ $(INSTALL) -m 755 ABQuery/sym/ABQuery $(install_prefix)$(libdir); \ fi if [ "$(VFORMAT)" != "no" ]; then \ $(INSTALL) -m 755 vcquery $(install_prefix)$(libdir); \ fi for i in $(MODULES); do \ $(INSTALL) -m 755 $$i $(install_prefix)$(libdir); \ done $(INSTALL) -m 644 lbdbq.man $(install_prefix)$(mandir)/man1/lbdbq.1 $(INSTALL) -m 644 lbdb-fetchaddr.man \ $(install_prefix)$(mandir)/man1/lbdb-fetchaddr.1 $(INSTALL) -m 644 lbdb.rc $(install_prefix)$(sysconfdir)/lbdb.rc if [ "$(DOTLOCK_TARGET)" != "" ]; then \ $(INSTALL) -m 755 lbdb_dotlock $(install_prefix)$(bindir); \ $(INSTALL) -m 644 dotlock.man \ $(install_prefix)$(mandir)/man1/lbdb_dotlock.1; \ fi if [ "$(TACTARGET)" != "" ]; then \ $(INSTALL) -m 755 tac $(install_prefix)$(libdir)/tac; \ fi fetchaddr: $(srcdir)/fetchaddr.o $(srcdir)/rfc822.o $(srcdir)/helpers.o \ $(srcdir)/rfc2047.o $(CC) $(CFLAGS) $(LIBICONV) $(LDFLAGS) $? -o $@ qpto8bit: $(srcdir)/qpto8bit.o $(srcdir)/rfc822.o $(srcdir)/helpers.o \ $(srcdir)/rfc2047.o $(CC) $(CFLAGS) $(LIBICONV) $(LDFLAGS) $? -o $@ fetch: $(srcdir)/fetch.sh query: $(srcdir)/query.sh lbdb-query: $(srcdir)/lbdb-query.sh nodelist2lbdb: $(srcdir)/nodelist2lbdb.pl cat nodelist2lbdb.pl > $@ palm_lsaddr: $(srcdir)/palm_lsaddr.pl cat palm_lsaddr.pl > $@ mutt_ldap_query: $(srcdir)/mutt_ldap_query.pl cat mutt_ldap_query.pl > $@ lbdb_dotlock: $(srcdir)/dotlock.o $(srcdir)/helpers.o $(CC) $(CFLAGS) $(LDFLAGS) $? -o $@ dotlock.o: $(srcdir)/dotlock.h $(srcdir)/dotlock.c tac: $(srcdir)/tac.awk cat tac.awk > $@ chmod a+x $@ munge: $(srcdir)/munge.awk cat munge.awk > $@ chmod a+x $@ munge-keeporder: $(srcdir)/munge-keeporder.awk cat munge-keeporder.awk > $@ chmod a+x $@ mutt_ldap_query.man: $(srcdir)/mutt_ldap_query.pl if [ "$(PERL)" != "no" ]; then \ pod2man mutt_ldap_query.pl > $@; \ else \ touch mutt_ldap_query.man; \ fi m_vcf: vcquery vcquery: vcquery.o $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $? -lvformat m_osx_addressbook: ABQuery/sym/ABQuery ABQuery/sym/ABQuery: ABQuery/pbxbuild.sh ABQuery/ABQuery.m ABQuery/pbxbuild.sh ABQuery/pbxbuild.sh: if [ "$(XCODEBUILD)" != "no" ]; then \ (cd ABQuery; xcodebuild -buildstyle Deployment; printf '#!/bin/sh\nmkdir ABQuery/sym\nEXE=ABQuery/build/ABQuery\nif test -x ABQuery/build/Deployment/ABQuery; then EXE=ABQuery/build/Deployment/ABQuery; fi\ncp $$EXE ABQuery/sym\n' > pbxbuild.sh; chmod a+x pbxbuild.sh) \ else \ (cd ABQuery; pbxbuild -buildstyle Deployment export) \ fi clean: -rm -f *.o *~ $(ALL) munge.awk munge-keeporder.awk tac.awk \ nodelist2lbdb.pl palm_lsaddr.pl mutt_ldap_query.pl lbdb_dotlock -rm -rf ABQuery/sym ABQuery/obj distclean: clean -rm -f config.status config.cache config.log Makefile -rm -f *.sh -rm -rf ABQuery/pbxbuild.data ABQuery/pbxbuild.sh -rm -f vcquery Makefile: Makefile.in ./config.status %.sh: %.sh.in ./config.status %.pl: %.pl.in ./config.status %.awk: %.awk.in ./config.status %.man: %.man.in sed -e 's!@''libdir@!$(libdir)!' \ -e 's!@''sysconfdir@!$(sysconfdir)!' \ -e 's!@''dotlock@!$(DOTLOCKBASE)!' $@.in > $@ %.o: %.c $(CC) $(CFLAGS) $(DEFS) -c $< lbdb-0.38ubuntu1/vcquery.c0000664000000000000000000000632611601367261012437 0ustar /* * Copyright (C) 2005 Brendan Cully * Copyright (C) 2010 martin f krafft * Copyright (C) 2011 Roland Rosenfeld * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,, USA. * * $Id: vcquery.c,v 1.7 2011-06-25 14:20:33 roland Exp $ */ #include #include #include #include #define STRING 256 typedef struct { char* filename; } option_t; int parse_opts(option_t* opts, int argc, char** argv); int main(int argc, char** argv) { option_t opts; VF_OBJECT_T* vfobj; VF_PROP_T* prop; char* propval; char* fullname; /* TODO: initialise */ char* nickname; if (parse_opts(&opts, argc, argv)) return 1; if (!vf_read_file(&vfobj, opts.filename)) { fprintf(stderr, "Could not read VCF file %s\n", opts.filename); return 1; } do { fullname = 0; /* First extract name */ if (vf_get_property(&prop, vfobj, VFGP_FIND, NULL, "FN", NULL)) if ((fullname = vf_get_prop_value_string(prop, 0))) fullname = strdup(fullname); /* No full name, lets try name */ if (!fullname && vf_get_property(&prop, vfobj, VFGP_FIND, NULL, "N", NULL)) { char name[STRING+1] = { 0 }; size_t available = STRING; int props = 0; while (available > 0 && (propval = vf_get_prop_value_string(prop, props++))) { strncat(name, propval, available); available -= strlen(propval); if (available > 0) strncat(name, " ", available--); } if (available < STRING) fullname = strdup(name); } /* TODO: fullname may actually still be NULL! */ nickname = NULL; if (vf_get_property(&prop, vfobj, VFGP_FIND, NULL, "NICKNAME", NULL)) { propval = vf_get_prop_value_string(prop, 0); if (propval) nickname = strdup(propval); } if (vf_get_property(&prop, vfobj, VFGP_FIND, NULL, "EMAIL", NULL)) { do { int props = 0; while ((propval = vf_get_prop_value_string(prop, props++))) { printf("%s\t%s", propval, fullname); if (nickname) { printf("\t%s", nickname); } else { putchar('\t'); } putchar('\n'); } } while (vf_get_next_property(&prop)); } if (fullname) free(fullname); if (nickname) free(nickname); } while (vf_get_next_object(&vfobj)); return 0; } int parse_opts(option_t* opts, int argc, char** argv) { if (argc < 2) { fprintf(stderr, "File name required\n"); return -1; } opts->filename = strdup(argv[1]); return 0; } lbdb-0.38ubuntu1/m_vcf.sh.in0000664000000000000000000000245411601367421012624 0ustar #! @SH@ # # Copyright (C) 2005 Brendan Cully # Copyright (C) 2011 Jamey Sharp # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software Foundation, # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,, USA. # # $Id: m_vcf.sh.in,v 1.5 2011-06-25 14:22:09 roland Exp $ m_vcf_query() { VCQ=@libdir@/vcquery QUERY="$1" for file in $VCF_FILES do if test -r $file.cache -a $file.cache -nt $file then cmd="cat $file.cache" else if $VCQ $file > $file.cache then cmd="cat $file.cache" else cmd="$VCQ $file" fi fi $cmd | grep -ie "$QUERY" | sed 's/(null)$/ /; s/ $/ (VCF)/' done } lbdb-0.38ubuntu1/munge.awk.in0000664000000000000000000000206710330705653013016 0ustar #! @AWK@ -f # # -*-awk-*- # # Copyright (C) 1998-2000 Thomas Roessler # 2000-2005 Roland Rosenfeld # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software Foundation, # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,, USA. # # $Id: munge.awk.in,v 1.7 2005-10-29 14:48:11 roland Exp $ BEGIN { FS = "\t"; } { line[$1] = $0; } END { for (a in line) { print line[a]; } } lbdb-0.38ubuntu1/lbdbq.sh.in0000664000000000000000000000541410624043174012615 0ustar #! @SH@ # # Copyright (C) 1998-2000 Thomas Roessler # 1998-2007 Roland Rosenfeld # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software Foundation, # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,, USA. # # $Id: lbdbq.sh.in,v 1.27 2007-05-20 13:00:44 roland Exp $ LBDB_VERSION=@LBDB_VERSION@ prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ sysconfdir=@sysconfdir@ METHODS="@MODULES@" MODULES_PATH=@libdir@ TAC=@TAC@ case "$1" in -v|--version) echo "lbdbq version $LBDB_VERSION" exit 0 break;; -h|--help) PROG=`basename $0` echo "Usage: $PROG 'something' search addresses matching 'something'" echo " $PROG -v|--version print version of lbdbq" echo " $PROG -h|--help this short help" exit 0 break;; esac . $libdir/lbdb_lib tmpdir=${TMPDIR-/tmp}/query.`hostname`.$$ mkdir $tmpdir || exit 1 trap "rm -rf $tmpdir ; trap '' 0; exit 1" 0 1 2 3 15 trap "rm -rf $tmpdir ; trap '' 0" 0 collection=$tmpdir/coll for conffile in $sysconfdir/lbdb.rc $HOME/.lbdbrc \ $HOME/.lbdb/lbdbrc $HOME/.lbdb/rc ; do if test -f $conffile ; then . $conffile fi done for method in $METHODS ; do for CURRENT_MODULE_DIR in $MODULES_PATH ; do if test -f $CURRENT_MODULE_DIR/$method ; then . $CURRENT_MODULE_DIR/$method break fi done done for method in $METHODS ; do eval ${method}_query \""$@"\" >> $collection || true done case "${KEEP_DUPES:-}" in true|yes) MUNGE=cat MUNGE_KEEPORDER=cat ;; *) MUNGE=$libdir/munge MUNGE_KEEPORDER=$libdir/munge-keeporder ;; esac case "${SORT_OUTPUT:-}" in false|no) $MUNGE_KEEPORDER $collection | $TAC > $collection.uniq ;; *name) $MUNGE $collection | sort -f -k2 > $collection.uniq ;; reverse_comment) $MUNGE $collection | sort -f -k3 -t' ' -r > $collection.uniq ;; comment) $MUNGE $collection | sort -f -k3 -t' ' > $collection.uniq ;; *) $MUNGE $collection | sort -f > $collection.uniq ;; esac lines=`wc -l $collection.uniq | awk '{print $1}'` if [ $lines = "0" ] then echo "lbdbq: no matches" exit 1 else echo "lbdbq: $lines matches" fi cat $collection.uniq lbdb-0.38ubuntu1/m_evolution.sh.in0000664000000000000000000000566011601361221014064 0ustar #! @SH@ # # -*-sh-*- # # m_evolution - Evolution Address book module for lbdb # Copyright (C) 2004 Guido Guenther # Copyright (C) 2004-2011 Roland Rosenfeld # Copyright (C) 2008 brian m. carlson # Copyright (C) 2009 Jan Larres # # loosely based on m_gnomecard # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software Foundation, # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. # m_evolution_query () { AWK=@AWK@ EVOLUTION_ADDRESSBOOK_EXPORT=@EVOLUTION_ADDRESSBOOK_EXPORT@ if [ "$EVOLUTION_ADDRESSBOOK_EXPORT" = "auto" ]; then for e in /usr/lib/evolution/*/evolution-addressbook-export do if [ -x $e ]; then EVOLUTION_ADDRESSBOOK_EXPORT=$e fi done fi if [ -x $EVOLUTION_ADDRESSBOOK_EXPORT ]; then $EVOLUTION_ADDRESSBOOK_EXPORT 2>/dev/null \ | $AWK 'BEGIN { FS = ":" RS = "\r\n" name = "" emails = "" last_email = 0 } /^END:VCARD/ { if ((name != "" || fileas != "") && emails != "") { sub("^#", "", emails) split(emails, emails_arr, "#") for (email in emails_arr) printf("%s\t%s\tEV:%s\n",emails_arr[email],name,fileas) } name = ""; fileas = ""; emails = "" } /^FN:/ { name = $2 } /^X-EVOLUTION-FILE-AS:/ { fileas = $2 gsub("\\\\", "", fileas) } # DEST-EMAIL is needed to skip addresses in list contacts /^EMAIL[;:]/ && ! /X-EVOLUTION-DEST-EMAIL/ { emails = emails "#" $2 last_email = 1 } # only join email lines for performance reasons /^ [^ ]/ && last_email == 1 { cont = $1 sub("^ ", "", cont) emails = emails cont } ! /^EMAIL[;:]/ && ! /^ [^ ]/ { last_email = 0 }' \ | grep -ia "$@" || : fi } lbdb-0.38ubuntu1/lbdb_bbdb_query.el0000664000000000000000000000206310002510763014201 0ustar ;;; query the bbdb for all records matching a given string; return them ;;; in lbdb-suitable format ;;; ;;; This code is (c) Utz-Uwe Haus 2001 ;;; Use, reuse and deletion are permitted in any way you can up with. (require 'bbdb) (require 'bbdb-com) (defun lbdb-bbdb-query (string) "Display all entries in the BBDB matching STRING in the Name, Company or email fields in lbdb-usable format, i.e. [TAB][TAB] where is BBDB:timestamp." (let ((matches (bbdb-search (bbdb-records) string string string nil nil)) (result "")) (mapcar (lambda (record) (let ((name (bbdb-record-name record)) (timestamp (bbdb-record-getprop record 'timestamp))) (mapcar (lambda (this-email) (setq result (concat result (format "%s\t%s\tBBDB:%s\n" this-email name timestamp)))) (bbdb-record-net record)))) matches) (princ result))) ;; the princ is for for emacs and xemacs, return value is for gnuclient (provide 'lbdb-bbdb-query) ; use like: ;(lbdb-bbdb-query "grae") lbdb-0.38ubuntu1/mutt_ldap_query.pl.in0000775000000000000000000004772511374554026014774 0ustar #! @PERL@ -w # # Copyright (C) 2000-2006 Marc de Courville # Copyright (C) 2005-2007 Roland Rosenfeld # # $Id: mutt_ldap_query.pl.in,v 1.28 2010-05-18 18:10:30 roland Exp $ # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software Foundation, # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,, USA. use strict; use Getopt::Long; use Net::LDAP; use Pod::Usage; #------8<------8<------8<------8<---cut here--->8------>8------>8------>8------ # The defaults my $man = 0; my $help = 0; my $DEBUG = 0; my $lbdb_output = 0; my $version = 0; my $ldap_server_nickname = ''; my $config_file = ''; # hostname of your ldap server our $ldap_server = 'ldap.four11.com'; # ldap base search our $search_base = 'c=US'; # list of the fields that will be used for the query our $ldap_search_fields = 'givenname sn cn'; # list of the fields that will be used for composing the answer our $ldap_expected_answers = 'givenname sn mail o'; # format of the email result based on the expected answers of the ldap query our $ldap_result_email = '${mail}'; # format of the realname result based on the expected answers of the ldap query our $ldap_result_realname = '${givenname} ${sn}'; # format of the comment result based on the expected answers of the ldap query our $ldap_result_comment = '(${o})'; # use ignorant (wildcard searching): our $ignorant = 0; # LDAP bind DN: our $ldap_bind_dn = ''; # LDAP bind password: our $ldap_bind_password = ''; our %ldap_server_db = ( 'four11' => ['ldap.four11.com', 'c=US', 'givenname sn cn mail', 'givenname cn sn mail o', '${mail}', '${givenname} ${sn}', '${o}' ], 'infospace' => ['ldap.infospace.com', 'c=US', 'givenname sn cn mail', 'givenname cn sn mail o', '${mail}', '${givenname} ${sn}', '${o}' ], 'whowhere' => ['ldap.whowhere.com', 'c=US', 'givenname sn cn mail', 'givenname cn sn mail o', '${mail}', '${givenname} ${sn}', '${o}' ], 'bigfoot' => ['ldap.bigfoot.com', 'c=US', 'givenname sn cn mail', 'givenname cn sn mail o', '${mail}', '${givenname} ${sn}', '${o}' ], 'switchboard' => ['ldap.switchboard.com', 'c=US', 'givenname sn cn mail', 'givenname cn sn mail o', '${mail}', '${givenname} ${sn}', '${o}' ], 'infospacebiz' => ['ldapbiz.infospace.com', 'c=US', 'givenname sn cn mail', 'givenname cn sn mail o', '${mail}', '${givenname} ${sn}', '${o}' ] ); #------8<------8<------8<------8<---cut here--->8------>8------>8------>8------ # Return version string from CVS tag sub versionstring { my $ver = ' $Name: debian_version_0_38 $ '; $ver =~ s/Name//g; $ver =~ s/[:\$]//g; $ver =~ s/\s+//g; $ver =~ s/^v//g; $ver =~ s/_/\./g; if ($ver eq '') { $ver = "devel"; } return($ver . " "); } # Source a perl file sub process_file { foreach my $file (@_) { if (-r $file) { unless (my $return = do $file) { warn "couldn't parse $file: $@" if $@; warn "couldn't do $file: $!" unless defined $return; warn "couldn't run $file" unless $return; } } # else { # warn "either $file doesn't exist or is not readable by me!\n"; # } } } # first we need to apply defaults process_file("@sysconfdir@/lbdb_ldap.rc", "@sysconfdir@/mutt_ldap_query.rc", "$ENV{HOME}/.lbdb/ldap.rc", "$ENV{HOME}/.mutt_ldap_query.rc"); # Parse command line options. They override system defaults. GetOptions ( 'config_file|c=s' => \$config_file, 'server|ls=s' => \$ldap_server, 'search_base|sb:s' => \$search_base, 'search_fields|sf:s' => \$ldap_search_fields, 'expected_answers|ea:s' => \$ldap_expected_answers, 'format_email|fe:s' => \$ldap_result_email, 'format_realname|fr:s' => \$ldap_result_realname, 'format_comment|fc:s' => \$ldap_result_comment, 'nickname|n=s' => \$ldap_server_nickname, 'bind_dn|bd:s' => \$ldap_bind_dn, 'bind_password|bp:s' => \$ldap_bind_password, 'debug' => sub { $DEBUG = 1 }, 'help|?|h' => \$help, 'man|m' => \$man, 'ignorant|i' => \$ignorant, 'lbdb_output|l' => \$lbdb_output, 'version|v' => \$version ); # # print usage and help info before we process config files # pod2usage(1) if $help; pod2usage(-verbose => 2) if $man; if ($version) { print "mutt_ldap_query version " . &versionstring() . "\n"; print '$Id: mutt_ldap_query.pl.in,v 1.28 2010-05-18 18:10:30 roland Exp $ ' . "\n"; exit(0); } # command-line config file take precedence over command-line options if ($config_file) { process_file($config_file); } # after we've done with GetOptions $ARGV[0] should present the rest # (i.e. mandatory search pattern) die pod2usage(1) if (! $ARGV[0] ); if ($ldap_server_nickname) { my $option_array = $ldap_server_db{$ldap_server_nickname}; die print "$0 unknown server nickname:\n\t no server associated to the nickname $ldap_server_nickname, please modify the internal database according your needs by editing the ressource file or specifying the relevant one to use\n" if ! $option_array; $ldap_server = $option_array->[0]; $search_base = $option_array->[1]; $ldap_search_fields = $option_array->[2]; $ldap_expected_answers = $option_array->[3]; $ldap_result_email = $option_array->[4]; $ldap_result_realname = $option_array->[5]; $ldap_result_comment = $option_array->[6]; if (defined($option_array->[7])) { $ignorant = $option_array->[7]; } if (defined($option_array->[8])) { $ldap_bind_dn = $option_array->[8]; } if (defined($option_array->[9])) { $ldap_bind_password = $option_array->[9]; } } print "DEBUG: ldap_server='$ldap_server' search_base='$search_base' search_fields='$ldap_search_fields'\ expected_answer='$ldap_expected_answers' format_email='$ldap_result_email' format_realname='$ldap_result_realname'\ bind_dn='$ldap_bind_dn' bind_password='$ldap_bind_password'\n" if ($DEBUG); my @fields = split / /, $ldap_search_fields; my @results; foreach my $askfor ( @ARGV ) { my $query=""; if ($ignorant) { # enable this if you want to include wildcard in your search with some huge # ldap databases you might want to avoid it $query = join '', map { "($_=*$askfor*)" } @fields; } else { $query = join '', map { "($_=$askfor)" } @fields; } $query = "(|" . $query . ")"; print "DEBUG: perl ldap module processing filter:\nDEBUG: $query\n" if ($DEBUG); my $ldap = Net::LDAP->new($ldap_server, Debug => 3) or die $@; if (defined($ldap_bind_dn) && $ldap_bind_dn ne '' && defined($ldap_bind_password) && $ldap_bind_password ne '') { $ldap->bind($ldap_bind_dn, password=> $ldap_bind_password); } else { $ldap->bind; } my $mesg = $ldap->search( base => $search_base, filter => $query ) or die $@; if ($mesg->code && ($mesg->code ne '4')) { die "Search failed. LDAP server returned an error : ", $mesg->code, ", description: ", $mesg->error; } my @entries = $mesg->entries; map { $_->dump } $mesg->all_entries if ($DEBUG); my $entry; foreach $entry (@entries) { print "DEBUG: processing $entry->dn\n" if ($DEBUG); # prepare the results my @emails = (); my $realname = $ldap_result_realname; my $comment = $ldap_result_comment; foreach my $answer (split / /, $ldap_expected_answers) { my $result = ''; # if this is email we take all the values if( $ldap_result_email =~ /\${$answer}/ ) { foreach my $result ($entry->get_value($answer)) { my $email = $ldap_result_email; $email =~ s/\${$answer}/$result/g; push @emails, $email; } } else { my $result = ''; # if there is no answer must return the null otherwise we get an uninitialized variable error ($result = $entry->get_value($answer)) || ($result = ''); # replace the containers with the results of the query $realname =~ s/\${$answer}/$result/g; $comment =~ s/\${$answer}/$result/g; } } foreach my $ema (@emails) { push @results, "$ema\t$realname\t$comment\n"; } } $ldap->unbind; } if ($lbdb_output) { # display results convenient for lbdb processing print @results; } else { print "LDAP query: found ", scalar(@results), "\n", @results; } exit 1 if ! @results; __END__ =head1 NAME mutt_ldap_query - Query LDAP server for Mutt mail-reader =head1 SYNOPSIS mutt_ldap_query.pl [options] [[] ...] =head1 OPTIONS =over 8 =item B<--config=config_file> or B<-c config_file> specify an alternate resource file other than the system ones (F<@sysconfdir@/lbdb_ldap.rc> or F<@sysconfdir@/mutt_ldap_query.rc>) or default personal ones (F<$HOME/.lbdb/ldap.rc> or F<$HOME/.mutt_ldap_query.rc>). =item B<--server=ldap_server> or B<-ls ldap_server> hostname of your ldap server. You can also use an ldap://foo[:port] or ldaps://foo[:port] URL here to talk to different ports or SSL encrypted servers. Or use ldapi://%2fvar%2flib%2fldap_sock to access an ldap server via a socket (use %2f as as replacement for a slash in the file name). =item B<--search_base=ldap_search_base> or B<-sb ldap_search_base> use as the starting point for the search instead of the default. =item B<--search_fields=ldap_search_fields> or B<-sf ldap_search_fields> list of the fields on which the query will be performed. =item B<--expected_answers=ldap_expected_answers> or B<-ea ldap_expected_answers> list of the fields expected as the answer of the ldap server that will be used for composing the output of the script. =item B<--format_email=result_format_email> or B<-fe result_format_email> format to be used for composing the email output result. It has to be based on the expected ldap server answers and can use variable containers of the form ${variable} where variable belongs to the set. =item B<--format_realname=result_format_realname> or B<-fr result_format_realname> format to be used for composing the realname output result. It has to be based on the expected ldap server answers and can use variable containers of the form ${variable} where variable belongs to the set. =item B<--format_comment=result_format_comment> or B<-fc result_format_comment> format to be used for composing the comment output result. It has to be based on the expected ldap server answers and can use variable containers of the form ${variable} where variable belongs to the set. =item B<--bind_dn=bind_distinguished_name> or B<-bd bind_distinguished_name> the destinguished name of the user who binds to the LDAP server. Leave it empty for an anonmyous bind. =item B<--bind_password=secret> or B<-bp secret> the bind password for binding to the LDAP server. Leave it empty for an anonmyous bind. =item B<--nickname=ldap_server_nickname> or B<-n ldap_server_nickname> shortcut for avoiding to use all the previous options by using the script builtin or alternate config file table of common servers and associated options. All the required parameters are then derived by performing a lookup. =item B<--debug> or B<-d> turn on debugging messages. =item B<--help> or B<-?> or B<-h> or B<--man> or B<-m> generates this help message. =item B<--ignorant> or B<-i> ignorant mode: search using wildcard for *name_to_query* (requires a longer processing from LDAP server but is quite convenient :). =item B<--lbdb_output> or B<-l> suppress number of matches output (suited for interfacing with little brother database http://www.spinnaker.de/lbdb/). =item B<--version> or B<-v> show the version. =back =head1 DESCRIPTION B performs ldap queries using either ldapsearch command or the perl-ldap module and it outputs the required formatted data for feeding mutt when using its "External Address Query" feature. The output of the script consists in 3 fields separated with tabs: the email address, the name of the person and a comment. =head1 INTERFACING WITH MUTT This perl script can be interfaced with mutt by defining in your .muttrc: set query_command = "mutt_ldap_query.pl %s" Multiple requests are supported: the "Q" command of mutt accepts as argument a list of queries (e.g. "Gosse de\ Courville"). Alternatively mutt_ldap_query can be interfaced with the more generic little brother database query program (http://www.spinnaker.de/lbdb/) using: set query_command = "lbdbq %s" and by specifying in your ~/.lbdb/lbdbrc file another method of query just adding to the METHODS variable the m_ldap module e.g.: METHODS='m_inmail m_passwd m_ldap m_muttalias m_finger' and the right path to access m_ldap in MODULES_PATH, e.g. if you moved F in F<~/.lbdb/modules>: MODULES_PATH="/usr/local/lib $HOME/.lbdb/modules" Just make sure to use the correct path for calling mutt_ldap_query in the m_ldap script. =head1 RESOURCE FILE FORMAT mutt_ldap_query is now fully customizable using an external resource file. By default mutt_ldap_query parses the system definition file located generally at F or F and also the user one: F<$HOME/.mutt_ldap_query.rc>. Instead of using command line options, the user can redefine all the variables using the resource file by two manners in order to match his site configuration. A file example is provided below: # The format of each entry of the ldap server database is the following: # LDAP_NICKNAME => ['LDAP_SERVER', # 'LDAP_SEARCH_BASE', # 'LDAP_SEARCH_FIELDS', # 'LDAP_EXPECTED_ANSWERS', # 'LDAP_RESULT_EMAIL', # 'LDAP_RESULT_REALNAME', # 'LDAP_RESULT_COMMENT'], # a practical illustrating example being: # debian => ['db.debian.org', # 'ou=users,dc=debian,dc=org', # 'uid cn sn ircnick', # 'uid cn sn ircnick', # '${uid}@debian.org', # '${cn} ${sn}', # '${ircnick}'], # the output of the query will be then: # ${uid}@debian.org\t${cn} ${sn}\t${ircnick} (i.e.: email name comment) # warning this database will erase default script builtin %ldap_server_db = ( 'four11' => ['ldap.four11.com', 'c=US', 'givenname sn cn mail', 'givenname cn sn mail o', '${mail}', '${givenname} ${sn}', '${o}' ], 'infospace' => ['ldap.infospace.com', 'c=US', 'givenname sn cn mail', 'givenname cn sn mail o', '${mail}', '${givenname} ${sn}', '${o}' ], 'whowhere' => ['ldap.whowhere.com', 'c=US', 'givenname sn cn mail', 'givenname cn sn mail o', '${mail}', '${givenname} ${sn}', '${o}' ], 'bigfoot' => ['ldap.bigfoot.com', 'c=US', 'givenname sn cn mail' , 'givenname cn sn mail o' , '${mail}' , '${givenname} ${sn}', '${o}' ], 'switchboard' => ['ldap.switchboard.com', 'c=US', 'givenname sn cn mail' , 'givenname cn sn mail o', '${mail}', '${givenname} ${sn}', '${o}' ], 'infospacebiz' => ['ldapbiz.infospace.com', 'c=US', 'givenname sn cn mail', 'givenname cn sn mail o', '${mail}', '${givenname} ${sn}', '${o}' ], ); # hostname of your ldap server $ldap_server = 'ldap.four11.com'; # ldap base search $search_base = 'c=US'; # list of the fields that will be used for the query $ldap_search_fields = 'givenname sn cn mail'; # list of the fields that will be used for composing the answer $ldap_expected_answers = 'givenname sn cn mail o'; # format of the email result based on the expected answers of the ldap query $ldap_result_email = '${mail}'; # format of the realname result based on the expected answers of the ldap query $ldap_result_realname = '${givenname} ${sn}'; # format of the comment result based on the expected answers of the ldap query $ldap_result_comment = '(${o})'; =head1 EXAMPLES OF QUERIES mutt_ldap_query.pl --ldap_server='ldap.mot.com' \ --search_base='ou=employees, o=Motorola,c=US' \ --ldap_search_fields='commonName gn sn cn uid' \ --ldap_expected_answers='gn sn preferredRfc822Recipient ou c telephonenumber' \ --ldap_result_email='${preferredRfc822Recipient}' \ --ldap_result_realname='${gn} ${sn}' \ --ldap_result_comment='(${telephonenumber}) ${ou} ${c}' \ Gosse de\ Courville performs a query using the ldap server ldap.mot.com using the following searching base 'ou=employees, o=Motorola,c=US' and performing a search on the fields 'commonName gn sn cn uid' for 'Gosse' and then "de Courville" looking for the following answers 'gn sn preferredRfc822Recipient ou c telephonenumber'. Based on this answers, mutt_ldap_query will return a list of entries identified of the form: <${preferredRfc822Recipient}>\t${gn} ${sn}\t(${telephonenumber}) ${ou} ${c} where ${} variables should be considered as containers that are replaced by the results of the query. The previous query can be greatly simplified by using the ldap server mini database feature of the resource file introducing for example a nickname. mutt_ldap_query.pl --ldap_server_nickname='motorola' Gosse de\ Courville When not sure of the full name (i.e. it should contain Courville) the ignorant mode is useful since the query will be performed using wildcards, i.e. *Courville* in the following case: mutt_ldap_query.pl --ignorant Courville =head1 WHERE TO GET IT The latest version can be retrieved at ftp://ftp.mutt.org/pub/mutt/contrib or http://www.courville.org/ Note that now the script is integrated in the latest version of the little brother database available at http://www.spinnaker.de/lbdb/. It is thus easier to use through this standard package than to hand customize it to fit your system/distribution needs. =head1 REFERENCES =over 2 =item - perl-ldap module http://perl-ldap.sourceforge.net/ =item - mutt is the ultimate email client http://www.mutt.org/ =item - historical Brandon Blong's "External Address Query" feature patch for mutt http://www.fiction.net/blong/programs/mutt/#query =item - little brother database is an interface query program for mutt that allow multiple searches for email addresses based on external query scripts just like this one 8-) http://www.spinnaker.de/lbdb/ =back =head1 AUTHORS Marc de Courville and the various other contributors... that kindly sent their patches. Please report any bugs, or post any suggestions, to . =head1 COPYRIGHT Copyright (c) 1998-2003 Marc de Courville . All rights reserved. This program is free software; you can redistribute it and/or modify it under the GNU General Public License (GPL). See http://www.opensource.org/gpl-license.html and http://www.opensource.org/. =cut