#!/usr/local/bin/python3.12
if __name__ == '__main__':
  import sys
  import os
  sys.path.insert(0, os.path.abspath('config'))
  import configure
  configure_options = [
    '--build=amd64-portbld-midnightbsd4',
    '--prefix=/usr/local',
    '--with-64-bit-indices',
    '--with-metis=1',
    '--with-mpi-dir=/usr/local',
    '--with-python-pkg-config=/usr/local/libdata/pkgconfig',
    '--with-python=1',
    '--with-shared-libraries=1',
    '--x-includes=/usr/local/include',
    '--x-libraries=/usr/local/lib',
    'AR=/usr/local/bin/ar',
    'CFLAGS=-O2 -pipe -fstack-protector-strong -fno-strict-aliasing  -msse2',
    'CPPFLAGS=',
    'CXXFLAGS=-O2 -pipe -fstack-protector-strong -fno-strict-aliasing  -msse2',
    'FCFLAGS=-Wl,-rpath=/usr/local/lib/gcc14',
    'FFLAGS=-Wl,-rpath=/usr/local/lib/gcc14',
    'LDFLAGS= /usr/local/lib/libmpi.so -L/usr/local/lib -Wl,-rpath=/usr/local/lib/gcc14  -L/usr/local/lib/gcc14 -B/usr/local/bin -fstack-protector-strong ',
    'LIBS=',
    'MAKEFLAGS= ARCH=amd64 CONFIGURE_MAX_CMD_LEN=524288 HAVE_COMPAT_IA32_KERN=YES\  OPSYS=MidnightBSD OSREL=4 OSVERSION=401002 PYTHONBASE=/usr/local _OSRELEASE=4.1',
    'PETSC_ARCH=arch-midnightbsd4-c-debug',
    'RANLIB=/usr/local/bin/ranlib',
  ]
  configure.petsc_configure(configure_options)
