install_libxc.sh 1.01 KB
Newer Older
Daniel Wortmann's avatar
Daniel Wortmann committed
1
libxc_version=4.2.1
2
if [ ! -d libxc-${libxc_version}_${FC} ]
3 4
then
    #Get the file with the code
Matthias Redies's avatar
Matthias Redies committed
5 6
    curl --connect-timeout 10 -LO "https://github.com/MRedies/libxc-mirror/raw/master/libxc-${libxc_version}.tar.gz"
    
7
    if [ ! -f libxc-${libxc_version}.tar.gz ]; then
Matthias Redies's avatar
Matthias Redies committed
8 9
        echo "No file found try source"
        curl --connect-timeout 10 -LO "http://www.tddft.org/programs/octopus/download/libxc/${libxc_version}/libxc-${libxc_version}.tar.gz"        
10 11
    fi

12
    tar xzf libxc-${libxc_version}.tar.gz
13 14
    mv libxc-${libxc_version} libxc-${libxc_version}_${FC}
    cd libxc-${libxc_version}_${FC}
15 16
    #Compile&test (This will take a while)
    ./configure --prefix=$PWD/INSTALL_DIR
Matthias Redies's avatar
Matthias Redies committed
17
    make -j
18 19
    make install
else
20
    cd libxc-${libxc_version}_${FC}
21
fi
Daniel Wortmann's avatar
Daniel Wortmann committed
22 23
#Store the installation location
FLEUR_LIBDIR="$PWD/INSTALL_DIR/lib $FLEUR_LIBDIR"
24
FLEUR_INCLUDEDIR="$PWD/INSTALL_DIR/include $FLEUR_INCLUDEDIR"
Daniel Wortmann's avatar
Daniel Wortmann committed
25 26 27 28 29 30
if [ $FLEUR_LIBRARIES ]
then
   FLEUR_LIBRARIES="$FLEUR_LIBRARIES;-lxcf03;-lxc"
else
   FLEUR_LIBRARIES="-lxcf03;-lxc"
fi