Georg Baum a écrit :
Abdelrazak Younes wrote:

svn property tab says 13757 (which is the last revision) and last
modified at 13744.

That is correct.

I erased the two files and svn updated again but the problem persist.

Does TourtoiseSVN not allow to apply the patch anyway?

No, it allows you to patch the other file but not those two. When there's a conflict in general you can do a tree way merge but that's apparently not possible here.

The commandline
client creates .rej files in that case, that must be merged by hand. But I
still don't understand why the patch does not apply, it did so for me.

Please find attached my lib/configure.py and lib/Makefile.am so that you can compare to your local version.

Abdel.
#! /usr/bin/env python
#
# file configure.py
# This file is part of LyX, the document processor.
# Licence details can be found in the file COPYING.

# \author Bo Peng
# Full author contact details are available in file CREDITS.

# This is an experimental version of the configure script, written
# in Python. 

import sys, os, re, shutil, glob


def writeToFile(filename, lines, append = False):
  " utility function: write or append lines to filename "
  if append:
    file = open(filename, 'a')
  else:
    file = open(filename, 'w')
  file.write(lines)
  file.close()


def addToRC(lines):
  ''' utility function: shortcut for appending lines to outfile
    add newline at the end of lines.
  '''
  if lines.strip() != '':
    writeToFile(outfile, lines + '\n', append = True)


def removeFiles(filenames):
  '''utility function: 'rm -f'
    ignore errors when file does not exist, or is a directory.
  '''
  for file in filenames:
    try:
      os.remove(file)
    except:
      pass


def cmdOutput(cmd):
  '''utility function: run a command and get its output as a string
    cmd: command to run
  '''
  fout = os.popen(cmd)
  output = fout.read()
  fout.close()
  return output.strip()


def setEnviron():
  ''' I do not really know why this is useful, but we might as well keep it.
    NLS nuisances.
    Only set these to C if already set.  These must not be set unconditionally
    because not all systems understand e.g. LANG=C (notably SCO).
    Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
    Non-C LC_CTYPE values break the ctype check.
  '''
  os.environ['LANG'] = os.getenv('LANG', 'C')
  os.environ['LC'] = os.getenv('LC_ALL', 'C')
  os.environ['LC_MESSAGE'] = os.getenv('LC_MESSAGE', 'C')
  os.environ['LC_CTYPE'] = os.getenv('LC_CTYPE', 'C')


def createDirectories():
  ''' Create the build directories if necessary '''
  for dir in ['bind', 'clipart', 'doc', 'examples', 'images', 'kbd', \
    'layouts', 'scripts', 'templates', 'ui' ]:
    if not os.path.isdir( dir ):
      try:
        os.mkdir( dir)
      except:
        print "Failed to create directory ", dir
        sys.exit(1)


def checkCygwinPath(srcdir):
  ''' Adjust PATH for Win32 (Cygwin) '''
  if sys.platform == 'cygwin':
    from tempfile import mkstemp
    fd, tmpfname = mkstemp(suffix='.ltx')
    os.write(fd, r'''
\documentstyle{article}
\begin{document}\end{document}
  ''')
    os.close(fd)
    inpname = cmdOutput('cygpath -m ' + tmpfname)
    # a wrapper file
    wfd, wtmpfname = mkstemp(suffix='.ltx')
    wtmpfname = cmdOutput('cygpath -m ' + wtmpfname)
    os.write(wfd, r'\input{' + inpname + '}' )
    os.close(wfd)
    if cmdOutput('latex ' + wtmpfname).find('Error') != -1:
      print "configure: cygwin detected; path correction is not needed"
    else:
      print "configure: cygwin detected; path correction"
      srcdir = cmdOutput('cygpath -m ' + srcdir)
      print "srcdir = ", srcdir
      addToRC(r'\cygwin_path_fix_needed true')
    tmpbname,ext = os.path.splitext(os.path.basename(tmpfname))
    wtmpbname,ext = os.path.splitext(os.path.basename(wtmpfname))
    removeFiles( [ tmpfname, wtmpfname, tmpbname + '.log', \
            tmpbname + '.aux', wtmpbname + '.log', wtmpbname + '.aux' ] )


## Searching some useful programs
def checkProg(description, progs, rc_entry = [], path = [] ):
  '''
    This function will search a program in $PATH plus given path
    If found, return directory and program name (not the options).

    description: description of the program

    progs: check programs, for each prog, the first word is used
      for searching but the whole string is used to replace
      %% for a rc_entry. So, feel free to add '$$i' etc for programs.

    path: additional path

    rc_entry: entry to outfile, can be emtpy, one pattern (%% for chosen
       prog or 'none'), or one for each prog and 'none'.

    NOTE: if you do not want 'none' entry to be added to the RC file,
      specify an entry for each prog and use '' for 'none' entry.

    FIXME: under windows, we should check registry instead of $PATH
  '''
  # one rc entry for each progs plus none entry
  if len(rc_entry) > 1 and len(rc_entry) != len(progs) + 1:
    print "rc entry should have one item or item for each prog and none."
    sys.exit(2)
  print 'checking for ' + description + '...'
  ## print '(' + ','.join(progs) + ')',
  for idx in range(len(progs)):
    # ac_prog may have options, ac_word is the command name
    ac_prog = progs[idx]
    ac_word = ac_prog.split(' ')[0]
    print '+checking for "' + ac_word + '"... ',
    path = os.environ["PATH"].split(os.pathsep) + path
    for ac_dir in path:
      # check both ac_word and ac_word.exe (for windows system)
      if os.path.isfile( os.path.join(ac_dir, ac_word) ) or \
         os.path.isfile( os.path.join(ac_dir, ac_word + ".exe") ):
        print ' yes'
        # write rc entries for this command
        if len(rc_entry) == 1:
          addToRC(rc_entry[0].replace('%%', ac_prog))
        elif len(rc_entry) > 1:
          addToRC(rc_entry[idx].replace('%%', ac_prog))
        return [ac_dir, ac_word]
    # if not successful
    print ' no'
  # write rc entries for 'not found'
  if len(rc_entry) > 0:  # the last one.
    addToRC(rc_entry[-1].replace('%%', 'none'))
  return ['', 'none']


def checkLatex():
  ''' Check latex, return lyx_check_config '''
  # Find programs! Returned path is not used now
  path, LATEX = checkProg( 'a Latex2e program', ['pplatex $$i', 'latex $$i', 
'latex2e $$i'],
    rc_entry = [ r'\converter latex      dvi        "%%"        "latex"' ] )
  # no latex
  if LATEX != 'none':
    # Check if latex is usable
    writeToFile('chklatex.ltx', '''
\\nonstopmode\\makeatletter
\\ifx\\undefined\\documentclass\\else
  \\message{ThisIsLaTeX2e}
\\fi
\\@@end
''')
    # run latex on chklatex.ltx and check result
    if cmdOutput(LATEX + ' chklatex.ltx').find('ThisIsLaTeX2e') != -1:
      # valid latex2e
      return LATEX
    else:
      print "Latex not usable (not LaTeX2e) "
    # remove temporary files
    removeFiles(['chklatex.ltx', 'chklatex.log'])
  return ''


def checkFormatEntries():  
  ''' Check all formats (\Format entries) '''
  checkProg('a Tgif viewer and editor', ['tgif'],
    rc_entry = [ r'\Format tgif       obj     Tgif                   "" "%%"    
"%%"'])
  #
  checkProg('a FIG viewer and editor', ['xfig'],
    rc_entry = [ r'\Format fig        fig     FIG                    "" "%%"    
"%%"'] )
  #
  checkProg('a Grace viewer and editor', ['xmgrace'],
    rc_entry = [ r'\Format agr        agr     Grace                  "" "%%"    
"%%"'] )
  #
  checkProg('a FEN viewer and editor', ['xboard -lpf $$i -mode EditPosition'],
    rc_entry = [ r'\Format fen        fen     FEN                    "" "%%"    
"%%"' ])
  #
  path, iv = checkProg('a raster image viewer', ['xv', 'kview', 'gimp'])
  path, ie = checkProg('a raster image editor', ['gimp'])
  addToRC(r'''\Format bmp        bmp     BMP                    "" "%s" "%s"
\Format gif        gif     GIF                    "" "%s"       "%s"
\Format jpg        jpg     JPEG                   "" "%s"       "%s"
\Format pbm        pbm     PBM                    "" "%s"       "%s"
\Format pgm        pgm     PGM                    "" "%s"       "%s"
\Format png        png     PNG                    "" "%s"       "%s"
\Format ppm        ppm     PPM                    "" "%s"       "%s"
\Format tiff       tif     TIFF                   "" "%s"       "%s"
\Format xbm        xbm     XBM                    "" "%s"       "%s"
\Format xpm        xpm     XPM                    "" "%s"       "%s"''' % \
    (iv, ie, iv, ie, iv, ie, iv, ie, iv, ie, iv, ie, iv, ie, iv, ie, iv, ie, 
iv, ie) )
  #
  checkProg('a text editor', ['xemacs', 'gvim', 'kedit', 'kwrite', 'kate', \
    'nedit', 'gedit', 'notepad'],
    rc_entry = [ r'''\Format asciichess asc    "Plain text (chess output)"  "" 
""       "%%"
\Format asciiimage asc    "Plain text (image)"         "" ""    "%%"
\Format asciixfig  asc    "Plain text (Xfig output)"   "" ""    "%%"
\Format dateout    tmp    "date (output)"         "" "" "%%"
\Format docbook    sgml    DocBook                B  "" "%%"
\Format docbook-xml xml   "Docbook (XML)"         "" "" "%%"
\Format literate   nw      NoWeb                  N  "" "%%"
\Format latex      tex    "LaTeX (plain)"         L  "" "%%"
\Format linuxdoc   sgml    LinuxDoc               x  "" "%%"
\Format pdflatex   tex    "LaTeX (pdflatex)"      "" "" "%%"
\Format text       txt    "Plain text"            a  "" "%%"
\Format textparagraph txt "Plain text (paragraphs)"    "" ""    "%%"''' ])
  #
  #checkProg('a Postscript interpreter', ['gs'],
  #  rc_entry = [ r'\ps_command "%%"' ])
  checkProg('a Postscript previewer', ['gsview32', 'gv', 'ghostview -swap', 
'kghostview'],
    rc_entry = [ r'''\Format eps        eps     EPS                    "" "%%"  
""
\Format ps         ps      Postscript             t  "%%"       ""''' ])
  #
  checkProg('a PDF previewer', ['acrobat', 'acrord32', 'gsview32', \
    'acroread', 'gv', 'ghostview', 'xpdf', 'kpdf', 'kghostview'],
    rc_entry = [ r'''\Format pdf        pdf    "PDF (ps2pdf)"          P  "%%"  
""
\Format pdf2       pdf    "PDF (pdflatex)"        F  "%%"       ""
\Format pdf3       pdf    "PDF (dvipdfm)"         m  "%%"       ""''' ])
  #
  checkProg('a DVI previewer', ['xdvi', 'windvi', 'yap', 'kdvi'],
    rc_entry = [ r'\Format dvi        dvi     DVI                    D  "%%"    
""' ])
  #
  checkProg('a HTML previewer', ['mozilla file://$$p$$i', 'netscape'],
    rc_entry = [ r'\Format html       html    HTML                   H  "%%"    
""' ])
  #
  # entried that do not need checkProg
  addToRC(r'''\Format date       ""     "date command"          "" ""   ""
\Format fax        ""      Fax                    "" "" ""
\Format lyx        lyx     LyX                    "" "" ""
\Format lyx13x     lyx13  "LyX 1.3.x"             "" "" ""
\Format lyxpreview lyxpreview "LyX Preview"       "" "" ""
\Format pdftex     pdftex_t PDFTEX                "" "" ""
\Format program    ""      Program                "" "" ""
\Format pstex      pstex_t PSTEX                  "" "" ""
\Format sxw        sxw    "OpenOffice.Org Writer" O  "" ""
\Format word       doc    "MS Word"               W  "" ""
\Format wordhtml   html   "MS Word (HTML)"        "" ""        ""
''')


def checkConverterEntries():
  ''' Check all converters (\converter entries) '''
  checkProg('the pdflatex program', ['pdflatex $$i'],
    rc_entry = [ r'\converter pdflatex   pdf2       "%%"        "latex"' ])
  
  ''' If we're running LyX in-place then tex2lyx will be found in
      ../src/tex2lyx. Add this directory to the PATH temporarily and
      search for tex2lyx.
      Use PATH to avoid any problems with paths-with-spaces.
  '''
  path_orig = os.environ["PATH"]
  os.environ["PATH"] = os.path.join('..','src','tex2lyx') + \
    os.pathsep + path_orig

  checkProg('a LaTeX -> LyX converter', ['tex2lyx -f $$i $$o', \
    'tex2lyx' +  version_suffix + ' -f $$i $$o' ],
    rc_entry = [ r'\converter latex      lyx        "%%"        ""' ])

  os.environ["PATH"] = path_orig

  #
  checkProg('a Noweb -> LyX converter', ['noweb2lyx' + version_suffix + ' $$i 
$$o'], path = ['./reLyX'],
    rc_entry = [ r'\converter literate   lyx        "%%"        ""' ])
  #
  checkProg('a Noweb -> LaTeX converter', ['noweave -delay -index $$i > $$o'],
    rc_entry = [ r'\converter literate   latex      "%%"        ""' ])
  #
  checkProg('a HTML -> LaTeX converter', ['html2latex $$i'],
    rc_entry = [ r'\converter html       latex      "%%"        ""' ])
  #
  checkProg('a MSWord -> LaTeX converter', ['wvCleanLatex $$i $$o'],
    rc_entry = [ r'\converter word       latex      "%%"        ""' ])
  #
  checkProg('a LaTeX -> MS Word converter', ["htlatex $$i 'html,word' 
'symbol/!' '-cvalidate'"],
    rc_entry = [ r'\converter latex      wordhtml   "%%"        ""' ])
  #
  checkProg('an OpenOffice.org -> LaTeX converter', ['w2l -clean $$i'],
    rc_entry = [ r'\converter sxw        latex      "%%"        ""' ])
  #
  checkProg('an LaTeX -> OpenOffice.org LaTeX converter', ['oolatex $$i', 
'oolatex.sh $$i'],
    rc_entry = [ r'\converter latex      sxw        "%%"        "latex"' ])
  #
  checkProg('a PS to PDF converter', ['ps2pdf13 $$i'],
    rc_entry = [ r'\converter ps         pdf        "%%"        ""' ])
  #
  checkProg('a DVI to PS converter', ['dvips -o $$o $$i'],
    rc_entry = [ r'\converter dvi        ps         "%%"        ""' ])
  #
  checkProg('a DVI to PDF converter', ['dvipdfm $$i'],
    rc_entry = [ r'\converter dvi        pdf3       "%%"        ""' ])
  #
  path, dvipng = checkProg('dvipng', ['dvipng'])
  if dvipng == "dvipng":
    addToRC(r'\converter lyxpreview png        "python 
$$s/scripts/lyxpreview2bitmap.py"        ""')
  else:
    addToRC(r'\converter lyxpreview png        ""       ""')
  #  
  checkProg('a fax program', ['kdeprintfax $$i', 'ksendfax $$i'],
    rc_entry = [ r'\converter ps         fax        "%%"        ""'])
  #
  checkProg('a FIG -> EPS/PPM converter', ['fig2dev'],
    rc_entry = [
      r'''\converter fig        eps        "fig2dev -L eps $$i $$o"     ""
\converter fig        ppm        "fig2dev -L ppm $$i $$o"       ""
\converter fig        png        "fig2dev -L png $$i $$o"       ""''',
      ''])
  #
  checkProg('a TIFF -> PS converter', ['tiff2ps $$i > $$o'],
    rc_entry = [ r'\converter tiff       eps        "%%"        ""', ''])
  #
  checkProg('a TGIF -> EPS/PPM converter', ['tgif'],
    rc_entry = [
      r'''\converter tgif       eps        "tgif -stdout -print -color -eps $$i 
> $$o"  ""
\converter tgif       pdf        "tgif -stdout -print -color -pdf $$i > $$o"    
""''',
      ''])
  #
  checkProg('a EPS -> PDF converter', ['epstopdf'],
    rc_entry = [ r'\converter eps        pdf        "epstopdf --outfile=$$o 
$$i"        ""', ''])
  #
  checkProg('a Grace -> Image converter', ['gracebat'],
    rc_entry = [
      r'''\converter agr        eps        "gracebat -hardcopy -printfile $$o 
-hdevice EPS $$i 2>/dev/null"     ""
\converter agr        png        "gracebat -hardcopy -printfile $$o -hdevice 
PNG $$i 2>/dev/null"       ""
\converter agr        jpg        "gracebat -hardcopy -printfile $$o -hdevice 
JPEG $$i 2>/dev/null"      ""
\converter agr        ppm        "gracebat -hardcopy -printfile $$o -hdevice 
PNM $$i 2>/dev/null"       ""''',
      ''])
  #
  checkProg('a LaTeX -> HTML converter', ['htlatex $$i', 'tth  -t -e2 -L$$b < 
$$i > $$o', \
    'latex2html -no_subdir -split 0 -show_section_numbers $$i', 'hevea -s $$i'],
    rc_entry = [ r'\converter latex      html       "%%"        
"originaldir,needaux"' ])
  #
  # FIXME: no rc_entry? comment it out
  # checkProg('Image converter', ['convert $$i $$o'])
  #
  # Entried that do not need checkProg
  addToRC(r'''\converter lyxpreview ppm        "python 
$$s/scripts/lyxpreview2bitmap.py"        ""
\converter date       dateout    "date +%d-%m-%Y > $$o" ""
\converter docbook    docbook-xml "cp $$i $$o"  "xml"
\converter fen        asciichess "python $$s/scripts/fen2ascii.py $$i $$o"      
""
\converter fig        pdftex     "sh $$s/scripts/fig2pdftex.sh $$i $$o" ""
\converter fig        pstex      "sh $$s/scripts/fig2pstex.sh $$i $$o"  ""
\converter lyx        lyx13x     "python $$s/lyx2lyx/lyx2lyx -t 221 $$i > $$o"  
""
''')


def checkLinuxDoc():
  ''' Check linuxdoc '''
  #
  path, LINUXDOC = checkProg('SGML-tools 1.x (LinuxDoc)', ['sgml2lyx'],
    rc_entry = [
    r'''\converter linuxdoc   lyx        "sgml2lyx $$i" ""
\converter linuxdoc   latex      "sgml2latex $$i"       ""
\converter linuxdoc   dvi        "sgml2latex -o dvi $$i"        ""
\converter linuxdoc   html       "sgml2html $$i"        ""''',
    r'''\converter linuxdoc   lyx        "none" ""
\converter linuxdoc   latex      "none" ""
\converter linuxdoc   dvi        "none" ""
\converter linuxdoc   html       "none" ""''' ])
  if LINUXDOC != 'none':
    return ('yes', 'true', '\\def\\haslinuxdoc{yes}')
  else:
    return ('no', 'false', '')


def checkDocBook():
  ''' Check docbook '''
  path, DOCBOOK = checkProg('SGML-tools 2.x (DocBook) or db2x scripts', 
['sgmltools', 'db2dvi'],
    rc_entry = [
      r'''\converter docbook    dvi        "sgmltools -b dvi $$i"       ""
\converter docbook    html       "sgmltools -b html $$i"        ""''',
      r'''\converter docbook    dvi        "db2dvi $$i" ""
\converter docbook    html       "db2html $$i"  ""''',
      r'''\converter docbook    dvi        "none"       ""
\converter docbook    html       "none" ""'''])
  #
  if DOCBOOK != 'none':
    return ('yes', 'true', '\\def\\hasdocbook{yes}')
  else:
    return ('no', 'false', '')


def checkOtherEntries():
  ''' entries other than Format and Converter '''
  checkProg('a *roff formatter', ['groff', 'nroff'],
    rc_entry = [
      r'\ascii_roff_command "groff -t -Tlatin1 $$FName"',
      r'\ascii_roff_command "tbl $$FName | nroff"',
      r'\ascii_roff_command "none"' ])
  checkProg('ChkTeX', ['chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38'],
    rc_entry = [ r'\chktex_command "%%"' ])
  checkProg('a spellchecker', ['ispell'],
    rc_entry = [ r'\spell_command "%%"' ])
  ## FIXME: OCTAVE is not used anywhere
  # path, OCTAVE = checkProg('Octave', ['octave'])
  ## FIXME: MAPLE is not used anywhere
  # path, MAPLE = checkProg('Maple', ['maple'])
  checkProg('a spool command', ['lp', 'lpr'],
    rc_entry = [
      r'''\print_spool_printerprefix "-d "
\print_spool_command "lp"''',
      r'''\print_spool_printerprefix "-P",
\print_spool_command "lpr"''',
      ''])
  # Add the rest of the entries (no checkProg is required)
  addToRC(r'''\copier    fig        "sh $$s/scripts/fig_copy.sh $$i $$o"
\copier    pstex      "python $$s/scripts/tex_copy.py $$i $$o $$l"
\copier    pdftex     "python $$s/scripts/tex_copy.py $$i $$o $$l"
''')


def processLayoutFile(file, bool_docbook, bool_linuxdoc):
  ''' process layout file and get a line of result
    
    Declear line are like this: (article.layout, scrbook.layout, svjog.layout)
    
    \DeclareLaTeXClass{article}
    \DeclareLaTeXClass[scrbook]{book (koma-script)}
    \DeclareLaTeXClass[svjour,svjog.clo]{article (Springer - svjour/jog)}

    we expect output:
    
    "article" "article" "article" "false"
    "scrbook" "scrbook" "book (koma-script)" "false"
    "svjog" "svjour" "article (Springer - svjour/jog)" "false"
  '''
  classname = file.split(os.sep)[-1].split('.')[0]
  # return ('LaTeX', '[a,b]', 'a', ',b,c', 'article') for 
\DeclearLaTeXClass[a,b,c]{article}
  p = 
re.compile(r'\Declare(LaTeX|DocBook|LinuxDoc)Class\s*(\[([^,]*)(,.*)*\])*\s*{(.*)}')
  for line in open(file).readlines():
    res = p.search(line)
    if res != None:
      (classtype, optAll, opt, opt1, desc) = res.groups()
      avai = {'LaTeX':'false', 'DocBook':bool_docbook, 
'LinuxDoc':bool_linuxdoc}[classtype]
      if opt == None:
        opt = classname
      return '"%s" "%s" "%s" "%s"\n' % (classname, opt, desc, avai)
  print "Layout file without \DeclearXXClass line. "
  sys.exit(2)

  
def checkLatexConfig(check_config, bool_docbook, bool_linuxdoc):
  ''' Explore the LaTeX configuration '''
  print 'checking LaTeX configuration... ',
  # First, remove the files that we want to re-create
  removeFiles(['textclass.lst', 'packages.lst', 'chkconfig.sed'])
  #
  if not check_config:
    print ' default values'
    print '+checking list of textclasses... '
    tx = open('textclass.lst', 'w')
    tx.write('''
# This file declares layouts and their associated definition files
# (include dir. relative to the place where this file is).
# It contains only default values, since chkconfig.ltx could not be run
# for some reason. Run ./configure if you need to update it after a
# configuration change.
''')
    # build the list of available layout files and convert it to commands
    # for chkconfig.ltx
    foundClasses = []
    for file in glob.glob( os.path.join('layouts', '*.layout') ) + \
      glob.glob( os.path.join(srcdir, 'layouts', '*.layout' ) ) :
      # valid file?
      if not os.path.isfile(file): 
        continue
      # get stuff between /xxxx.layout .
      classname = file.split(os.sep)[-1].split('.')[0]
      #  tr ' -' '__'`
      cleanclass = classname.replace(' ', '_')
      cleanclass = cleanclass.replace('-', '_')
      # make sure the same class is not considered twice
      if foundClasses.count(cleanclass) == 0: # not found before
        foundClasses.append(cleanclass)
        tx.write(processLayoutFile(file, bool_docbook, bool_linuxdoc))
    tx.close()
    print '\tdone'
  else:
    print '\tauto'
    removeFiles(['wrap_chkconfig.ltx', 'chkconfig.vars', \
      'chkconfig.classes', 'chklayouts.tex'])
    rmcopy = False
    if not os.path.isfile( 'chkconfig.ltx' ):
      shutil.copy( os.path.join(srcdir, 'chkconfig.ltx'),  'chkconfig.ltx' )
      rmcopy = True
    writeToFile('wrap_chkconfig.ltx', '%s\n%s\n\\input{chkconfig.ltx}\n' \
      % (linuxdoc_cmd, docbook_cmd) )
    # Construct the list of classes to test for.
    # build the list of available layout files and convert it to commands
    # for chkconfig.ltx
    p1 = re.compile(r'\Declare(LaTeX|DocBook|LinuxDoc)Class')
    testclasses = list()
    for file in glob.glob( os.path.join('layouts', '*.layout') ) + \
      glob.glob( os.path.join(srcdir, 'layouts', '*.layout' ) ) :
      if not os.path.isfile(file):
        continue
      classname = file.split(os.sep)[-1].split('.')[0]
      for line in open(file).readlines():
        if p1.search(line) == None:
          continue
        if line[0] != '#':
          print "Wrong input layout file with line '" + line
          sys.exit(3)
        testclasses.append("\\TestDocClass{%s}{%s}" % (classname, 
line[1:].strip()))
        break
    testclasses.sort()
    cl = open('chklayouts.tex', 'w')
    for line in testclasses:
      cl.write(line + '\n')
    cl.close()
    #
    # we have chklayouts.tex, then process it
    for line in cmdOutput(LATEX + ' wrap_chkconfig.ltx').splitlines():
      if re.match('^\+', line):
        print line
    #
    # currently, values in chhkconfig are only used to set
    # \font_encoding
    values = {}
    for line in open('chkconfig.vars').readlines():
      key, val = re.sub('-', '_', line).split('=')
      values[key] = val.strip("'\n")
    # chk_fontenc may not exist 
    try:
      addToRC(r'\font_encoding "%s"' % values["chk_fontenc"])
    except:
      pass
    if rmcopy:   # remove the copied file
      removeFiles( [ 'chkconfig.ltx' ] )


def createLaTeXConfig():
  ''' create LaTeXConfig.lyx '''
  # if chkconfig.sed does not exist (because LaTeX did not run),
  # then provide a standard version.
  if not os.path.isfile('chkconfig.sed'):
    writeToFile('chkconfig.sed', '[EMAIL PROTECTED]@!???!g\n')
  print "creating packages.lst"
  # if packages.lst does not exist (because LaTeX did not run),
  # then provide a standard version.
  if not os.path.isfile('packages.lst'):
    writeToFile('packages.lst', '''
### This file should contain the list of LaTeX packages that have been
### recognized by LyX. Unfortunately, since configure could not find
### your LaTeX2e program, the tests have not been run. Run ./configure
### if you need to update it after a configuration change.
''')
  print 'creating doc/LaTeXConfig.lyx'
  #
  # This is originally done by sed, using a
  # tex-generated file chkconfig.sed
  ##sed -f chkconfig.sed ${srcdir}/doc/LaTeXConfig.lyx.in
  ##  >doc/LaTeXConfig.lyx
  # Now, we have to do it by hand (python).
  #
  # add to chekconfig.sed
  writeToFile('chkconfig.sed', '''[EMAIL PROTECTED]@!%s!g
[EMAIL PROTECTED]@!%s!g
  ''' % (chk_linuxdoc, chk_docbook) , append=True)
  # process this sed file!!!!
  lyxin = open( os.path.join(srcdir, 'doc', 'LaTeXConfig.lyx.in')).readlines()
  # get the rules
  p = re.compile(r's!(.*)!(.*)!g')
  # process each sed replace.
  for sed in open('chkconfig.sed').readlines():
    if sed.strip() == '':
      continue
    try:
      fr, to = p.match(sed).groups()
      # if latex did not run, change all @name@ to '???'
      if fr == '@.*@':
        for line in range(len(lyxin)):
          lyxin[line] = re.sub('@.*@', to, lyxin[line])
      else:
        for line in range(len(lyxin)):
          lyxin[line] = lyxin[line].replace(fr, to)
    except:  # wrong sed entry?
      print "Wrong sed entry in chkconfig.sed: '" + sed + "'"
      sys.exit(4)
  # 
  writeToFile( os.path.join('doc', 'LaTeXConfig.lyx'),
    ''.join(lyxin))


def checkTeXAllowSpaces():
  ''' Let's check whether spaces are allowed in TeX file names '''
  tex_allows_spaces = 'false'
  if lyx_check_config:
    print "Checking whether TeX allows spaces in file names... ",
    writeToFile('a b.tex', r'\message{working^^J}' )
    # FIXME: the bsh version uses < /dev/null which is not portable.
    # Can anyone confirm if this option (-interaction) is available
    # at other flavor of latex as well? (MikTex/win, Web2C/linux are fine.) 
    if ''.join(cmdOutput(LATEX + ' -interaction=nonstopmode "a 
b"')).find('working') != -1:
      print 'yes'
      tex_allows_spaces = 'true'
    else:
      print 'no'
      tex_allows_spaces = 'false'
    addToRC(r'\tex_allows_spaces ' + tex_allows_spaces)
    removeFiles( [ 'a b.tex', 'a b.log', 'texput.log' ])


def removeExtraFiles():
  # Remove superfluous files if we are not writing in the main lib
  # directory
  for file in [outfile, 'textclass.lst', 'packages.lst', \
    'doc/LaTeXConfig.lyx']:
    try:
      # we rename the file first, so that we avoid comparing a file with itself
      os.rename(file, file + '.new')
      syscfg = open( os.path.join(srcdir, file) ).read()
      mycfg = open( file + '.new').read()
      if mycfg == syscfg:
        print "removing ", file, " which is identical to the system global 
version"
        removeFiles( [file + '.new'] )
      else:
        os.rename( file + '.new', file )
    except:  # use local version if anthing goes wrong.
      os.rename( file + '.new', file )
      pass
  # Final clean-up
  if not lyx_keep_temps:
    removeFiles(['chkconfig.sed', 'chkconfig.vars',  \
      'wrap_chkconfig.ltx', 'wrap_chkconfig.log', \
      'chklayouts.tex', 'missfont.log'])


if __name__ == '__main__':
  lyx_check_config = True
  outfile = 'lyxrc.defaults'
  rc_entries = ''
  lyx_keep_temps = False
  version_suffix = ''
  ## Parse the command line
  for op in sys.argv[1:]:   # default shell/for list is $*, the options
    if op in [ '-help', '--help', '-h' ]:
      print '''Usage: configure [options]
Options:
  --help                   show this help lines
  --keep-temps             keep temporary files (for debug. purposes)
  --without-latex-config   do not run LaTeX to determine configuration
  --with-version-suffix=suffix suffix of binary installed files
'''
      sys.exit(0)
    elif op == '--without-latex-config':
      lyx_check_config = False
    elif op == '--keep-temps':
      lyx_keep_temps = True
    elif op[0:22] == '--with-version-suffix=':  # never mind if op is not long 
enough
      version_suffix = op[22:]
    else:
      print "Unknown option", op
      sys.exit(1)
  #    
  # check if we run from the right directory
  srcdir = os.path.dirname(sys.argv[0])
  if srcdir == '':
    srcdir = '.'
  if not os.path.isfile( os.path.join(srcdir, 'chkconfig.ltx') ):
    print "configure: error: cannot find chkconfig.ltx script"
    sys.exit(1)
  setEnviron()
  createDirectories()
  checkCygwinPath(srcdir)
  ## Write the first part of outfile
  writeToFile(outfile, '''# This file has been automatically generated by LyX' 
lib/configure.py
# script. It contains default settings that have been determined by
# examining your system. PLEASE DO NOT MODIFY ANYTHING HERE! If you
# want to customize LyX, make a copy of the file LYXDIR/lyxrc as
# ~/.lyx/lyxrc and edit this file instead. Any setting in lyxrc will
# override the values given here.
''')
  # check latex
  LATEX = checkLatex()
  checkFormatEntries()
  checkConverterEntries()
  (chk_linuxdoc, bool_linuxdoc, linuxdoc_cmd) = checkLinuxDoc()
  (chk_docbook, bool_docbook, docbook_cmd) = checkDocBook()
  checkTeXAllowSpaces()
  checkOtherEntries()
  # --without-latex-config can disable lyx_check_config
  checkLatexConfig( lyx_check_config and LATEX != '', bool_docbook, 
bool_linuxdoc)
  createLaTeXConfig()
  removeExtraFiles()
include $(top_srcdir)/config/common.am

DISTCLEANFILES += texput.log textclass.lst packages.lst lyxrc.defaults

SUBDIRS = doc lyx2lyx

EXTRA_DIST = \
        chkconfig.ltx

CHMOD = chmod

# We cannot use dist_pkgdata_SCRIPTS for configure, since a possible
# version-suffix would get appended to the names. So we use dist_pkgdata_DATA
# and chmod manually in install-data-hook.
dist_pkgdata_DATA = lyxrc.example CREDITS chkconfig.ltx configure.py \
               lyxrc.defaults textclass.lst packages.lst external_templates \
               encodings languages symbols syntax.default

dist_noinst_DATA = \
        images/README \
        images/font-smallcaps.xpm \
        images/math/ams_arrows.xbm \
        images/math/ams_misc.xbm \
        images/math/ams_nrel.xbm \
        images/math/ams_ops.xbm \
        images/math/ams_rel.xbm \
        images/math/arrows.xbm \
        images/math/bop.xbm \
        images/math/brel.xbm \
        images/math/deco.xbm \
        images/math/deco.xpm \
        images/math/delim0.xpm \
        images/math/delim1.xpm \
        images/math/delim.xbm \
        images/math/dots.xbm \
        images/math/font.xbm \
        images/math/frac-square.xpm \
        images/math/greek.xbm \
        images/math/misc.xbm \
        images/math/varsz.xbm

binddir = $(pkgdatadir)/bind
dist_bind_DATA = \
        bind/broadway.bind \
        bind/cua.bind \
        bind/cyrkeys.bind \
        bind/de_menus.bind \
        bind/emacs.bind \
        bind/fi_menus.bind \
        bind/greekkeys.bind \
        bind/hollywood.bind \
        bind/latinkeys.bind \
        bind/mac.bind \
        bind/math.bind \
        bind/menus.bind \
        bind/pt_menus.bind \
        bind/sciword.bind \
        bind/sv_menus.bind \
        bind/xemacs.bind \
        bind/aqua.bind

clipartdir = $(pkgdatadir)/clipart
dist_clipart_DATA = clipart/platypus.eps

examplesdir = $(pkgdatadir)/examples
dist_examples_DATA = \
        examples/Foils.lyx \
        examples/ItemizeBullets.lyx \
        examples/Literate.lyx \
        examples/Minipage.lyx \
        examples/TableExamples.lyx \
        examples/aa_sample.lyx \
        examples/aas_sample.lyx \
        examples/amsart-test.lyx \
        examples/amsbook-test.lyx \
        examples/ca_splash.lyx \
        examples/chess-article.lyx \
        examples/chessgame.lyx \
        examples/currency.lyx \
        examples/cv.lyx \
        examples/da_splash.lyx \
        examples/de_ItemizeBullets.lyx \
        examples/de_Lebenslauf.lyx \
        examples/de_Minipage.lyx \
        examples/de_TableExamples.lyx \
        examples/de_Waehrungen.lyx \
        examples/de_beispiel_gelyxt.lyx \
        examples/de_beispiel_roh.lyx \
        examples/de_decimal.lyx \
        examples/de_splash.lyx \
        examples/de_mathed.lyx \
        examples/de_multicol.lyx \
        examples/decimal.lyx \
        examples/docbook_article.lyx \
        examples/es_ejemplo_con_lyx.lyx \
        examples/es_ejemplo_sin_lyx.lyx \
        examples/es_splash.lyx \
        examples/eu_adibide_gordina.lyx \
        examples/eu_adibide_lyx-atua.lyx \
        examples/eu_splash.lyx \
        examples/example_lyxified.lyx \
        examples/example_raw.lyx \
        examples/fr_AlignementDecimal.lyx \
        examples/fr_CV.lyx \
        examples/fr_ExemplesTableaux.lyx \
        examples/fr_Foils.lyx \
        examples/fr_ListesPuces.lyx \
        examples/fr_Minipage.lyx \
        examples/fr_exemple_brut.lyx \
        examples/fr_exemple_lyxifie.lyx \
        examples/fr_mathed.lyx \
        examples/fr_multicol.lyx \
        examples/fr_splash.lyx \
        examples/he_example_raw.lyx \
        examples/he_he_example_lyxified.lyx \
        examples/he_he_example_raw.lyx \
        examples/hu_splash.lyx \
        examples/iecc05.fen \
        examples/iecc07.fen \
        examples/iecc12.fen \
        examples/it_ItemizeBullets.lyx \
        examples/it_splash.lyx \
        examples/landslide.lyx \
        examples/linuxdoc_manpage.lyx \
        examples/listerrors.lyx \
        examples/mathed.lyx \
        examples/multicol.lyx \
        examples/nl_multicol.lyx \
        examples/nl_opsommingstekens.lyx \
        examples/nl_splash.lyx \
        examples/nl_voorbeeld_ruw.lyx \
        examples/nl_voorbeeld_verlyxt.lyx \
        examples/noweb2lyx.lyx \
        examples/pl_splash.lyx \
        examples/pt_splash.lyx \
        examples/ru_splash.lyx \
        examples/script_form.lyx \
        examples/sl_primer_lyxan.lyx \
        examples/sl_primer_surov.lyx \
        examples/sl_splash.lyx \
        examples/splash.lyx \
        examples/g-brief2.lyx \
        examples/ro_splash.lyx

imagesdir = $(pkgdatadir)/images
dist_images_DATA = \
        images/amssymb.xpm \
        images/banner.ppm \
        images/bookmark-goto.xpm \
        images/bookmark-save.xpm \
        images/break-line.xpm \
        images/buffer-close.xpm \
        images/buffer-export_dvi.xpm \
        images/buffer-export_latex.xpm \
        images/buffer-export_ps.xpm \
        images/buffer-export_text.xpm \
        images/buffer-new.xpm \
        images/buffer-reload.xpm \
        images/buffer-update_dvi.xpm \
        images/buffer-update_ps.xpm \
        images/buffer-view_dvi.xpm \
        images/buffer-view_ps.xpm \
        images/buffer-write-as.xpm \
        images/buffer-write.xpm \
        images/build-program.xpm \
        images/copy.xpm \
        images/cut.xpm \
        images/depth-decrement.xpm \
        images/depth-increment.xpm \
        images/dialog-preferences.xpm \
        images/dialog-show-new-inset_citation.xpm \
        images/dialog-show-new-inset_graphics.xpm \
        images/dialog-show-new-inset_include.xpm \
        images/dialog-show-new-inset_ref.xpm \
        images/dialog-show_character.xpm \
        images/dialog-show_findreplace.xpm \
        images/dialog-show_mathpanel.xpm \
        images/dialog-show_print.xpm \
        images/dialog-show_spellchecker.xpm \
        images/down.xpm \
        images/ert-insert.xpm \
        images/file-open.xpm \
        images/float-insert_figure.xpm \
        images/float-insert_table.xpm \
        images/font-bold.xpm \
        images/font-emph.xpm \
        images/font-free-apply.xpm \
        images/font-noun.xpm \
        images/font-sans.xpm \
        images/footnote-insert.xpm \
        images/index-insert.xpm \
        images/label-insert.xpm \
        images/layout-document.xpm \
        images/layout-paragraph.xpm \
        images/layout_Description.xpm \
        images/layout_Enumerate.xpm  \
        images/layout_Itemize.xpm \
        images/layout_List.xpm \
        images/layout_LyX-Code.xpm \
        images/layout_Scrap.xpm \
        images/layout_Section.xpm \
        images/lyx-quit.xpm \
        images/lyx.xpm \
        images/marginalnote-insert.xpm \
        images/math-display.xpm \
        images/math-matrix.xpm \
        images/math-mode.xpm \
        images/math-subscript.xpm \
        images/math-superscript.xpm \
        images/note-insert.xpm \
        images/paste.xpm \
        images/psnfss1.xpm \
        images/psnfss2.xpm \
        images/psnfss3.xpm \
        images/psnfss4.xpm \
        images/redo.xpm \
        images/standard.xpm \
        images/tabular-feature_align-center.xpm \
        images/tabular-feature_align-left.xpm \
        images/tabular-feature_align-right.xpm \
        images/tabular-feature_append-column.xpm \
        images/tabular-feature_append-row.xpm \
        images/tabular-feature_delete-column.xpm \
        images/tabular-feature_delete-row.xpm \
        images/tabular-feature_multicolumn.xpm \
        images/tabular-feature_set-all-lines.xpm \
        images/tabular-feature_set-longtabular.xpm \
        images/tabular-feature_set-rotate-cell.xpm \
        images/tabular-feature_set-rotate-tabular.xpm \
        images/tabular-feature_toggle-line-bottom.xpm \
        images/tabular-feature_toggle-line-left.xpm \
        images/tabular-feature_toggle-line-right.xpm \
        images/tabular-feature_toggle-line-top.xpm \
        images/tabular-feature_unset-all-lines.xpm \
        images/tabular-feature_valign-bottom.xpm \
        images/tabular-feature_valign-middle.xpm \
        images/tabular-feature_valign-top.xpm \
        images/tabular-insert.xpm \
        images/thesaurus-entry.xpm \
        images/toc-view.xpm \
        images/undo.xpm \
        images/unknown.xpm \
        images/up.xpm \
        images/url-insert.xpm

imagesmathdir = $(imagesdir)/math
dist_imagesmath_DATA = \
        images/math/style.xbm \
        images/math/font.xpm \
        images/math/delim.xpm \
        images/math/equation.xpm \
        images/math/matrix.xpm \
        images/math/space.xpm \
        images/math/sqrt-square.xpm \
        images/math/style.xpm \
        images/math/sub.xpm \
        images/math/super.xpm \
        images/math/Bbbk.xpm \
        images/math/Finv.xpm \
        images/math/Game.xpm \
        images/math/Im.xpm \
        images/math/Lleftarrow.xpm \
        images/math/Lsh.xpm \
        images/math/Re.xpm \
        images/math/Rsh.xpm \
        images/math/Vert.xpm \
        images/math/Vvdash.xpm \
        images/math/acute.xpm \
        images/math/aleph.xpm \
        images/math/alpha.xpm \
        images/math/amalg.xpm \
        images/math/angle.xpm \
        images/math/approx.xpm \
        images/math/approxeq.xpm \
        images/math/asymp.xpm \
        images/math/backepsilon.xpm \
        images/math/backprime.xpm \
        images/math/backsim.xpm \
        images/math/backsimeq.xpm \
        images/math/backslash.xpm \
        images/math/bar.xpm \
        images/math/bars.xpm \
        images/math/barwedge.xpm \
        images/math/because.xpm \
        images/math/beta.xpm \
        images/math/beth.xpm \
        images/math/between.xpm \
        images/math/bigcap.xpm \
        images/math/bigcirc.xpm \
        images/math/bigcup.xpm \
        images/math/bigodot.xpm \
        images/math/bigoplus.xpm \
        images/math/bigotimes.xpm \
        images/math/bigsqcup.xpm \
        images/math/bigstar.xpm \
        images/math/bigtriangledown.xpm \
        images/math/bigtriangleup.xpm \
        images/math/biguplus.xpm \
        images/math/bigvee.xpm \
        images/math/bigwedge.xpm \
        images/math/blacklozenge.xpm \
        images/math/blacksquare.xpm \
        images/math/blacktriangle.xpm \
        images/math/blacktriangledown.xpm \
        images/math/blacktriangleleft.xpm \
        images/math/blacktriangleright.xpm \
        images/math/bot.xpm \
        images/math/bowtie.xpm \
        images/math/boxdot.xpm \
        images/math/boxminus.xpm \
        images/math/boxplus.xpm \
        images/math/boxtimes.xpm \
        images/math/breve.xpm \
        images/math/bullet.xpm \
        images/math/bumpeq.xpm \
        images/math/bumpeq2.xpm \
        images/math/cap.xpm \
        images/math/cap2.xpm \
        images/math/cases.xpm \
        images/math/cdot.xpm \
        images/math/cdots.xpm \
        images/math/centerdot.xpm \
        images/math/check.xpm \
        images/math/chi.xpm \
        images/math/circ.xpm \
        images/math/circeq.xpm \
        images/math/circlearrowleft.xpm \
        images/math/circlearrowright.xpm \
        images/math/circledS.xpm \
        images/math/circledast.xpm \
        images/math/circledcirc.xpm \
        images/math/circleddash.xpm \
        images/math/clubsuit.xpm \
        images/math/complement.xpm \
        images/math/cong.xpm \
        images/math/coprod.xpm \
        images/math/cup.xpm \
        images/math/cup2.xpm \
        images/math/curlyeqprec.xpm \
        images/math/curlyeqsucc.xpm \
        images/math/curlyvee.xpm \
        images/math/curlywedge.xpm \
        images/math/curvearrowleft.xpm \
        images/math/curvearrowright.xpm \
        images/math/dagger.xpm \
        images/math/daleth.xpm \
        images/math/dashleftarrow.xpm \
        images/math/dashrightarrow.xpm \
        images/math/dashv.xpm \
        images/math/ddagger.xpm \
        images/math/ddot.xpm \
        images/math/ddots.xpm \
        images/math/delta.xpm \
        images/math/delta2.xpm \
        images/math/diagdown.xpm \
        images/math/diagup.xpm \
        images/math/diamond.xpm \
        images/math/diamondsuit.xpm \
        images/math/digamma.xpm \
        images/math/div.xpm \
        images/math/divideontimes.xpm \
        images/math/dot.xpm \
        images/math/doteq.xpm \
        images/math/doteqdot.xpm \
        images/math/dotplus.xpm \
        images/math/doublebarwedge.xpm \
        images/math/downarrow.xpm \
        images/math/downarrow2.xpm \
        images/math/downdownarrows.xpm \
        images/math/downharpoonleft.xpm \
        images/math/downharpoonright.xpm \
        images/math/ell.xpm \
        images/math/empty.xpm \
        images/math/emptyset.xpm \
        images/math/epsilon.xpm \
        images/math/eqcirc.xpm \
        images/math/eqslantgtr.xpm \
        images/math/eqslantless.xpm \
        images/math/equiv.xpm \
        images/math/eta.xpm \
        images/math/eth.xpm \
        images/math/exists.xpm \
        images/math/fallingdotseq.xpm \
        images/math/flat.xpm \
        images/math/forall.xpm \
        images/math/frac.xpm \
        images/math/frown.xpm \
        images/math/gamma.xpm \
        images/math/gamma2.xpm \
        images/math/geq.xpm \
        images/math/geqq.xpm \
        images/math/geqslant.xpm \
        images/math/gg.xpm \
        images/math/ggg.xpm \
        images/math/gimel.xpm \
        images/math/gnapprox.xpm \
        images/math/gneq.xpm \
        images/math/gneqq.xpm \
        images/math/gnsim.xpm \
        images/math/grave.xpm \
        images/math/gtrapprox.xpm \
        images/math/gtrdot.xpm \
        images/math/gtreqless.xpm \
        images/math/gtreqqless.xpm \
        images/math/gtrless.xpm \
        images/math/gtrsim.xpm \
        images/math/gvertneqq.xpm \
        images/math/hat.xpm \
        images/math/hbar.xpm \
        images/math/heartsuit.xpm \
        images/math/hookleftarrow.xpm \
        images/math/hookrightarrow.xpm \
        images/math/hslash.xpm \
        images/math/imath.xpm \
        images/math/in.xpm \
        images/math/infty.xpm \
        images/math/int.xpm \
        images/math/intercal.xpm \
        images/math/iota.xpm \
        images/math/jmath.xpm \
        images/math/kappa.xpm \
        images/math/lambda.xpm \
        images/math/lambda2.xpm \
        images/math/langle.xpm \
        images/math/lbrace.xpm \
        images/math/lbrace_rbrace.xpm \
        images/math/lbracket.xpm \
        images/math/lbracket_rbracket.xpm \
        images/math/lceil.xpm \
        images/math/lceil_rceil.xpm \
        images/math/ldots.xpm \
        images/math/leftarrow.xpm \
        images/math/leftarrow2.xpm \
        images/math/leftarrowtail.xpm \
        images/math/leftharpoondown.xpm \
        images/math/leftharpoonup.xpm \
        images/math/leftleftarrows.xpm \
        images/math/leftrightarrow.xpm \
        images/math/leftrightarrow2.xpm \
        images/math/leftrightarrows.xpm \
        images/math/leftrightharpoons.xpm \
        images/math/leftrightsquigarrow.xpm \
        images/math/leftthreetimes.xpm \
        images/math/leq.xpm \
        images/math/leqq.xpm \
        images/math/leqslant.xpm \
        images/math/lessapprox.xpm \
        images/math/lessdot.xpm \
        images/math/lesseqgtr.xpm \
        images/math/lesseqqgtr.xpm \
        images/math/lessgtr.xpm \
        images/math/lesssim.xpm \
        images/math/lfloor.xpm \
        images/math/lfloor_rfloor.xpm \
        images/math/ll.xpm \
        images/math/llcorner.xpm \
        images/math/lll.xpm \
        images/math/lnapprox.xpm \
        images/math/lneq.xpm \
        images/math/lneqq.xpm \
        images/math/lnsim.xpm \
        images/math/longleftarrow.xpm \
        images/math/longleftarrow2.xpm \
        images/math/longleftrightarrow.xpm \
        images/math/longleftrightarrow2.xpm \
        images/math/longmapsto.xpm \
        images/math/longrightarrow.xpm \
        images/math/longrightarrow2.xpm \
        images/math/looparrowleft.xpm \
        images/math/looparrowright.xpm \
        images/math/lozenge.xpm \
        images/math/lparen.xpm \
        images/math/lparen_rparen.xpm \
        images/math/lrcorner.xpm \
        images/math/ltimes.xpm \
        images/math/lvertneqq.xpm \
        images/math/mapsto.xpm \
        images/math/mathbb_C.xpm \
        images/math/mathbb_H.xpm \
        images/math/mathbb_N.xpm \
        images/math/mathbb_Q.xpm \
        images/math/mathbb_R.xpm \
        images/math/mathbb_Z.xpm \
        images/math/mathcal_F.xpm \
        images/math/mathcal_H.xpm \
        images/math/mathcal_L.xpm \
        images/math/mathcal_O.xpm \
        images/math/mathcircumflex.xpm \
        images/math/mathrm_T.xpm \
        images/math/measuredangle.xpm \
        images/math/mho.xpm \
        images/math/mid.xpm \
        images/math/models.xpm \
        images/math/mp.xpm \
        images/math/mu.xpm \
        images/math/multimap.xpm \
        images/math/nabla.xpm \
        images/math/natural.xpm \
        images/math/ncong.xpm \
        images/math/nearrow.xpm \
        images/math/neg.xpm \
        images/math/neq.xpm \
        images/math/nexists.xpm \
        images/math/ngeq.xpm \
        images/math/ngeqq.xpm \
        images/math/ngeqslant.xpm \
        images/math/ngtr.xpm \
        images/math/ni.xpm \
        images/math/nleftarrow.xpm \
        images/math/nleftarrow2.xpm \
        images/math/nleftrightarrow.xpm \
        images/math/nleftrightarrow2.xpm \
        images/math/nleq.xpm \
        images/math/nleqq.xpm \
        images/math/nleqslant.xpm \
        images/math/nless.xpm \
        images/math/nmid.xpm \
        images/math/notin.xpm \
        images/math/nparallel.xpm \
        images/math/nprec.xpm \
        images/math/npreceq.xpm \
        images/math/nrightarrow.xpm \
        images/math/nrightarrow2.xpm \
        images/math/nshortmid.xpm \
        images/math/nshortparallel.xpm \
        images/math/nsim.xpm \
        images/math/nsubseteq.xpm \
        images/math/nsucc.xpm \
        images/math/nsucceq.xpm \
        images/math/nsupseteq.xpm \
        images/math/nsupseteqq.xpm \
        images/math/ntriangleleft.xpm \
        images/math/ntrianglelefteq.xpm \
        images/math/ntriangleright.xpm \
        images/math/ntrianglerighteq.xpm \
        images/math/nu.xpm \
        images/math/nvdash.xpm \
        images/math/nvdash2.xpm \
        images/math/nvdash3.xpm \
        images/math/nwarrow.xpm \
        images/math/odot.xpm \
        images/math/oint.xpm \
        images/math/omega.xpm \
        images/math/omega2.xpm \
        images/math/ominus.xpm \
        images/math/oplus.xpm \
        images/math/oslash.xpm \
        images/math/otimes.xpm \
        images/math/overbrace.xpm \
        images/math/overleftarrow.xpm \
        images/math/overleftrightarrow.xpm \
        images/math/overline.xpm \
        images/math/overrightarrow.xpm \
        images/math/parallel.xpm \
        images/math/partial.xpm \
        images/math/perp.xpm \
        images/math/phi.xpm \
        images/math/phi2.xpm \
        images/math/pi.xpm \
        images/math/pi2.xpm \
        images/math/pitchfork.xpm \
        images/math/pm.xpm \
        images/math/prec.xpm \
        images/math/precapprox.xpm \
        images/math/preccurlyeq.xpm \
        images/math/preceq.xpm \
        images/math/precnapprox.xpm \
        images/math/precnsim.xpm \
        images/math/precsim.xpm \
        images/math/prime.xpm \
        images/math/prod.xpm \
        images/math/propto.xpm \
        images/math/psi.xpm \
        images/math/psi2.xpm \
        images/math/rangle.xpm \
        images/math/rbrace.xpm \
        images/math/rbracket.xpm \
        images/math/rceil.xpm \
        images/math/rfloor.xpm \
        images/math/rho.xpm \
        images/math/rightarrow.xpm \
        images/math/rightarrow2.xpm \
        images/math/rightarrowtail.xpm \
        images/math/rightharpoondown.xpm \
        images/math/rightharpoonup.xpm \
        images/math/rightleftarrows.xpm \
        images/math/rightleftharpoons.xpm \
        images/math/rightrightarrows.xpm \
        images/math/rightsquigarrow.xpm \
        images/math/rightthreetimes.xpm \
        images/math/risingdotseq.xpm \
        images/math/root.xpm \
        images/math/rparen.xpm \
        images/math/rtimes.xpm \
        images/math/searrow.xpm \
        images/math/setminus.xpm \
        images/math/sharp.xpm \
        images/math/shortmid.xpm \
        images/math/shortparallel.xpm \
        images/math/sigma.xpm \
        images/math/sigma2.xpm \
        images/math/sim.xpm \
        images/math/simeq.xpm \
        images/math/slash.xpm \
        images/math/smallfrown.xpm \
        images/math/smallsetminus.xpm \
        images/math/smallsmile.xpm \
        images/math/smile.xpm \
        images/math/spadesuit.xpm \
        images/math/sphericalangle.xpm \
        images/math/sqcap.xpm \
        images/math/sqcup.xpm \
        images/math/sqrt.xpm \
        images/math/sqsubset.xpm \
        images/math/sqsubseteq.xpm \
        images/math/sqsupset.xpm \
        images/math/sqsupseteq.xpm \
        images/math/square.xpm \
        images/math/star.xpm \
        images/math/subset.xpm \
        images/math/subset2.xpm \
        images/math/subseteq.xpm \
        images/math/subseteqq.xpm \
        images/math/subsetneq.xpm \
        images/math/subsetneqq.xpm \
        images/math/succ.xpm \
        images/math/succapprox.xpm \
        images/math/succcurlyeq.xpm \
        images/math/succeq.xpm \
        images/math/succnapprox.xpm \
        images/math/succnsim.xpm \
        images/math/succsim.xpm \
        images/math/sum.xpm \
        images/math/supset.xpm \
        images/math/supset2.xpm \
        images/math/supseteq.xpm \
        images/math/supseteqq.xpm \
        images/math/supsetneq.xpm \
        images/math/supsetneqq.xpm \
        images/math/surd.xpm \
        images/math/swarrow.xpm \
        images/math/tau.xpm \
        images/math/textrm_Oe.xpm \
        images/math/textrm_AA.xpm \
        images/math/therefore.xpm \
        images/math/theta.xpm \
        images/math/theta2.xpm \
        images/math/thickapprox.xpm \
        images/math/thicksim.xpm \
        images/math/tilde.xpm \
        images/math/times.xpm \
        images/math/top.xpm \
        images/math/triangle.xpm \
        images/math/triangledown.xpm \
        images/math/triangleleft.xpm \
        images/math/trianglelefteq.xpm \
        images/math/triangleq.xpm \
        images/math/triangleright.xpm \
        images/math/trianglerighteq.xpm \
        images/math/twoheadleftarrow.xpm \
        images/math/twoheadrightarrow.xpm \
        images/math/ulcorner.xpm \
        images/math/underbrace.xpm \
        images/math/underleftarrow.xpm \
        images/math/underleftrightarrow.xpm \
        images/math/underline.xpm \
        images/math/underrightarrow.xpm \
        images/math/underscore.xpm \
        images/math/uparrow.xpm \
        images/math/uparrow2.xpm \
        images/math/updownarrow.xpm \
        images/math/updownarrow2.xpm \
        images/math/upharpoonleft.xpm \
        images/math/upharpoonright.xpm \
        images/math/uplus.xpm \
        images/math/upsilon.xpm \
        images/math/upsilon2.xpm \
        images/math/upuparrows.xpm \
        images/math/urcorner.xpm \
        images/math/varepsilon.xpm \
        images/math/varkappa.xpm \
        images/math/varnothing.xpm \
        images/math/varphi.xpm \
        images/math/varpi.xpm \
        images/math/varpropto.xpm \
        images/math/varsigma.xpm \
        images/math/varsubsetneq.xpm \
        images/math/varsubsetneqq.xpm \
        images/math/varsupsetneq.xpm \
        images/math/varsupsetneqq.xpm \
        images/math/vartheta.xpm \
        images/math/vartriangle.xpm \
        images/math/vartriangleleft.xpm \
        images/math/vartriangleright.xpm \
        images/math/vdash.xpm \
        images/math/vdash2.xpm \
        images/math/vdash3.xpm \
        images/math/vdots.xpm \
        images/math/vec.xpm \
        images/math/vee.xpm \
        images/math/veebar.xpm \
        images/math/wedge.xpm \
        images/math/widehat.xpm \
        images/math/widetilde.xpm \
        images/math/wp.xpm \
        images/math/wr.xpm \
        images/math/xi.xpm \
        images/math/xi2.xpm \
        images/math/zeta.xpm

kbddir = $(pkgdatadir)/kbd
dist_kbd_DATA = \
        kbd/american-2.kmap \
        kbd/american.kmap \
        kbd/arabic.kmap \
        kbd/bg-bds-1251.kmap \
        kbd/brazil.kmap \
        kbd/brazil2.kmap \
        kbd/cp1251.cdef \
        kbd/czech-prg.kmap \
        kbd/czech.kmap \
        kbd/european.kmap \
        kbd/francais.kmap \
        kbd/french.kmap \
        kbd/german-2.kmap \
        kbd/german-3.kmap \
        kbd/german.kmap \
        kbd/greek.kmap \
        kbd/hebrew.kmap \
        kbd/ibm866.cdef \
        kbd/iso8859-1.cdef \
        kbd/iso8859-15.cdef \
        kbd/iso8859-2.cdef \
        kbd/iso8859-3.cdef \
        kbd/iso8859-4.cdef \
        kbd/iso8859-7.cdef \
        kbd/iso8859-8.cdef \
        kbd/iso8859-9.cdef \
        kbd/koi8-r.cdef \
        kbd/koi8-r.kmap \
        kbd/koi8-t.cdef \
        kbd/koi8-u.cdef \
        kbd/koi8-u.kmap \
        kbd/latvian.kmap \
        kbd/magyar-2.kmap \
        kbd/magyar-3.kmap \
        kbd/magyar.kmap \
        kbd/null.kmap \
        kbd/polish.kmap \
        kbd/polski.kmap \
        kbd/portuges.kmap \
        kbd/romanian.kmap \
        kbd/serbian.kmap \
        kbd/serbocroatian.kmap \
        kbd/sf.kmap \
        kbd/sg.kmap \
        kbd/slovak.kmap \
        kbd/slovene.kmap \
        kbd/thai-kedmanee.kmap \
        kbd/tis620-0.cdef \
        kbd/transilvanian.kmap \
        kbd/turkish-f.kmap \
        kbd/turkish.kmap \
        kbd/espanol.kmap

layoutsdir = $(pkgdatadir)/layouts
dist_layouts_DATA =\
        layouts/IEEEtran.layout \
        layouts/aa.layout \
        layouts/aapaper.inc \
        layouts/aapaper.layout \
        layouts/aastex.layout \
        layouts/aguplus.inc \
        layouts/amsart-plain.layout \
        layouts/amsart-seq.layout \
        layouts/amsart.layout \
        layouts/amsbook.layout \
        layouts/amsdefs.inc \
        layouts/amsmaths-plain.inc \
        layouts/amsmaths-seq.inc \
        layouts/amsmaths.inc \
        layouts/apa.layout \
        layouts/article.layout \
        layouts/book.layout \
        layouts/broadway.layout \
        layouts/chess.layout \
        layouts/cl2emult.layout \
        layouts/cv.layout \
        layouts/db_lyxmacros.inc \
        layouts/db_stdclass.inc \
        layouts/db_stdcharstyles.inc \
        layouts/db_stdcounters.inc \
        layouts/db_stdlayouts.inc \
        layouts/db_stdlists.inc \
        layouts/db_stdsections.inc \
        layouts/db_stdstarsections.inc \
        layouts/db_stdstruct.inc \
        layouts/db_stdtitle.inc \
        layouts/dinbrief.layout \
        layouts/docbook-book.layout \
        layouts/docbook-chapter.layout \
        layouts/docbook-section.layout \
        layouts/docbook.layout \
        layouts/dtk.layout \
        layouts/egs.layout \
        layouts/elsart.layout \
        layouts/entcs.layout \
        layouts/extarticle.layout \
        layouts/extbook.layout \
        layouts/extletter.layout \
        layouts/extreport.layout \
        layouts/foils.layout \
        layouts/g-brief-de.layout \
        layouts/g-brief-en.layout \
        layouts/heb-article.layout \
        layouts/heb-letter.layout \
        layouts/hollywood.layout \
        layouts/ijmpd.layout \
        layouts/jgrga.layout \
        layouts/kluwer.layout \
        layouts/latex8.layout \
        layouts/letter.layout \
        layouts/linuxdoc.layout \
        layouts/literate-article.layout \
        layouts/literate-book.layout \
        layouts/literate-report.layout \
        layouts/literate-scrap.inc \
        layouts/llncs.layout \
        layouts/ltugboat.layout \
        layouts/lyxmacros.inc \
        layouts/manpage.layout \
        layouts/mwart.layout \
        layouts/mwbk.layout \
        layouts/mwrep.layout \
        layouts/paper.layout \
        layouts/report.layout \
        layouts/revtex.layout \
        layouts/revtex4.layout \
        layouts/scrartcl.layout \
        layouts/scrbook.layout \
        layouts/scrclass.inc \
        layouts/scrlettr.layout \
        layouts/scrlttr2.layout \
        layouts/scrreprt.layout \
        layouts/seminar.layout \
        layouts/siamltex.layout \
        layouts/slides.layout \
        layouts/spie.layout \
        layouts/stdclass.inc \
        layouts/stdcounters.inc \
        layouts/stdfloats.inc \
        layouts/stdlayouts.inc \
        layouts/stdletter.inc \
        layouts/stdlists.inc \
        layouts/stdsections.inc \
        layouts/stdstarsections.inc \
        layouts/stdstruct.inc \
        layouts/stdtitle.inc \
        layouts/svjog.layout \
        layouts/svjour.inc \
        layouts/svprobth.layout \
        layouts/agums.layout \
        layouts/memoir.layout \
        layouts/numarticle.inc \
        layouts/numreport.inc \
        layouts/numrevtex.inc \
        layouts/agu-dtd.layout \
        layouts/agu_stdclass.inc \
        layouts/agu_stdcounters.inc \
        layouts/agu_stdlists.inc \
        layouts/agu_stdsections.inc \
        layouts/agu_stdtitle.inc \
        layouts/g-brief2.layout \
        layouts/svglobal.layout

scriptsdir = $(pkgdatadir)/scripts
# We cannot use dist_scripts_SCRIPTS, since a possible version-suffix would
# get appended to the names. So we use dist_scripts_DATA and chmod manually
# in install-data-hook.
dist_scripts_DATA = \
        scripts/TeXFiles.sh \
        scripts/convertDefault.sh \
        scripts/fen2ascii.py \
        scripts/fig2pdftex.sh \
        scripts/fig2pstex.sh \
        scripts/fig_copy.sh \
        scripts/layout2layout.py \
        scripts/legacy_lyxpreview2ppm.py \
        scripts/listerrors \
        scripts/lyxpreview2bitmap.py \
        scripts/lyxpreview_tools.py \
        scripts/tex_copy.py

templatesdir = $(pkgdatadir)/templates
dist_templates_DATA = \
        templates/IEEEtran.lyx \
        templates/README.new_templates \
        templates/aa.lyx \
        templates/aastex.lyx \
        templates/dinbrief.lyx \
        templates/docbook_article.lyx \
        templates/elsart.lyx \
        templates/g-brief-de.lyx \
        templates/g-brief-en.lyx \
        templates/hollywood.lyx \
        templates/kluwer.lyx \
        templates/koma-letter2.lyx \
        templates/latex8.lyx \
        templates/letter.lyx \
        templates/linuxdoc_article.lyx \
        templates/revtex.lyx \
        templates/revtex4.lyx \
        templates/slides.lyx \
        templates/ijmpd.lyx \
        templates/agu_article.lyx

texdir = $(pkgdatadir)/tex
dist_tex_DATA = \
        tex/broadway.cls \
        tex/cv.cls \
        tex/hollywood.cls \
        tex/lyxchess.sty \
        tex/lyxskak.sty \
        tex/revtex.cls

uidir = $(pkgdatadir)/ui
dist_ui_DATA = \
        ui/classic.ui \
        ui/default.ui \
        ui/stdmenus.ui \
        ui/stdtoolbars.ui

lyxrc.defaults: $(srcdir)/configure.py
        python $<

install-data-hook:
        $(CHMOD) 755 $(DESTDIR)$(pkgdatadir)/configure.py
        for i in $(dist_scripts_DATA); do \
                $(CHMOD) 755 $(DESTDIR)$(pkgdatadir)/$$i; \
        done

Reply via email to