Ubuntu – How to compile gedit LaTeX plugin

compilinggeditlatex

Because I'd like to use the Gedit LaTeX plugin that is unfortunately not available for Gedit 3.2 in the repositories, I want to compile it myself. The most recent version you can get on http://git.gnome.org/browse/gedit-latex does support GNOME 3
's Gedit.

In the documentation it says:

Due to a limitation on reading Settings, the plugin currently must be
installed in the same prefix as gedit. For instance if you are using
gedit 3 from your distribution, you need to do

./configure --prefix=/usr make sudo make install

If you are using a 64bit distribution, you also need to pass
--libdir=/usr/lib64 to ./configure script.

That's why I cded into the directory that contains the code, and tried to run ./configure --prefix=/usr --libdir=/usr/lib64. Unfortunately, this does not work, giving the error message:

bash: ./configure: No such file or directory

Having checked the folder, there indeed is no file configure, but only configure.ac. What can I do to compile this plugin?

Best Answer

  1. Library necessaries to build the configuration files

    sudo apt-get install intltool libtool
    
  2. Dependency necessary to compile this plug-ins

    sudo apt-get install gedit-dev
    
  3. Build the configuration file

    touch config.rpath
    ./autogen.sh
    
  4. Configure and compile

    ./configure --prefix=/usr
    make
    sudo make install
    

If you are using a 64bit distribution, you also need to pass --libdir=/usr/lib64 to ./configure script.

    ./configure --prefix=/usr --libdir=/usr/lib64

With a 64bit distribution, I also had to create two symbolic links, otherwise the plugin would not show up:

sudo ln -s /usr/lib64/gedit/plugins/latex.plugin /usr/lib/gedit/plugins/
sudo ln -s /usr/lib64/gedit/plugins/latex /usr/lib/gedit/plugins/